Fixed bug in the test itself (I've forgotten about immutability of the Position class)
Disallowing castling if the king has moved.

This doesn't take into account castling permission for another side.
Extracted method for detecting possible castling destinations.
Keep correctly information about the fact if king has moved and thus right to castling is lost.