Increase the size of the index fields of move iterator.

It was over flowing.
Add template for fast stalemate/checkmate detection.