Rank2Reward: Learning Shaped Reward Functions from Passive Video