Variational problems on complex contact manifolds with applications to twistor space theory