Self-Consistent Theory of Lattice Distortion in Solid p-H2, o-D2 and HD