Vortex lattice stability and phase coherence in three-dimensional rapidly rotating Bose-Einstein condensates