Rewriting History with Inverse RL: Hindsight Inference for Policy Improvement