Geometrical Origin and Theory of Negative Thermal Expansion in Framework Structures