Reinforcement Learning for Branch-and-Bound Optimisation using Retrospective Trajectories