Don't allow undo after the game is over

This doesn't work as expected if the board has been flipped.
Fix infinite loop when neither side has valid move

If neither side can move while unoccupied squares still exist iagno
goes into an infinite loop.

This is a fix for bug https://bugzilla.gnome.org/show_bug.cgi?id=701122