Flow State Estimation and Optimal Control for Autonomous Underwater Docking