Text this: Non-Parametric Kinematic Optimization of Flapping Foil Propulsion Using a Discrete Adjoint Method.