Add isOnTheBoard() to ChessBoard.

Refactoring this into a method makes the intent clearer and allows reuse
elsewhere.
Add addPiece() to ChessBoard.

The ability to add a piece at a specified location will be handy for
testing and will allow the implementation of pawn promotion in the
future. This change also adds tests for the new method.