Improve castling movegen

Make sure that the squares inbetween the king and the rook are empty.

Fixed a bug with the invariant short-circuiting.