Only take gold when leaving the gold square.

Instead of removing the gold as soon as Pacman moves to the square,
remove it only after Pacman leaves the square.
Although both options are valid, this is the correct one to make the
visualisations succeed. See vis/vis.asp:26 for details.