UCI engines *crash* on FENs with missing trailing spaces.
Try to fix a reentrancy bug in chess-display-move.

The problem occurs with engine modules which reply to move events with move
events directly, i.e. cvhess-ai and chess-uci when replying with a book move.
Since chess-display-move first performs chess-game-move followed by
chess-display-paint-move, we end up with the plies getting painted in reverse.
This is visible when pieces are taken.
If we paint the move first and then emit the move event on the game,
the problem goes away.
Fix a rather serious bug in chess-pos-move:

We were checking for king or rook moves to remove our castling flags if necessary,
but we did not remove the opponents castling flags if we took one of their rooks.

This led to rather invalid positions.  You could castle with your king and
the opponents piece.
Try to fix 045a93cb98dfd320e756ea9d9799ea92f0900bc6 a different way.

Restore the old behaviour (run game hooks before painting move),
but move the post-move hook from chess-game-move to chess-display-move.

This fixes the reentrancy bug while preserving error checks being done in
the game hooks.

Maybe rename post-move to post-display-move?
Refactor chess-plain-handler a bit.
chess-pos.el: Reorder some definitions to pacify compiler.

Also, actually disable assertions during compilation (as intended)
which increases performance by roughly 30%.
chess-clock-tick-tock: Fix an error on first call.

First time around, chess-clock-last-time is nil.
chess-rf-to-index: Fix assertion.

Should be and, not or.  cl-check-type is more clear anyway.
For some reason, chess-pos.el needs to be compiled first.