Variable Fidelity Optimization with Hardware-in-the-Loop for Flapping Flight