Phase Estimation for Fast Action Recognition and Trajectory Generation in Human-Robot Collaboration