algebraic: implement castling
castling: fix a funny bug with backwards black castling