Refactoring and optimizations

Refactored the piece movement code out of Piece and into Board. Also
added optimization for Piece movement caching