Invariant Measures, Geometry, and Control of Hybrid and Nonholonomic Dynamical Systems