Vibrational modes and lattice distortion of a nitrogen-vacancy center in diamond from first-principles calculations