Functional Castling and Checkmate

Castling should now cover all cases (just added intermediate step
checking), and program also now prints debug message when player is in
checkmate.