Hydrodynamic Propulsion and Its Optimization: Analytic Theory