On the role of geometry in statistical mechanics and thermodynamics I: Geometric perspective