Relay Policy Learning: Solving Long-Horizon Tasks via Imitation and Reinforcement Learning