fixed castling, resolves #2
fixed one last bug for castling
added unit tests for castling through check