Chemiosmosis and ATP Synthase as a Gradient-to-Work Machine