fix equal method to ensure object y is board type and has right
dimenstion before comparsion.

address findbugs complain about int[][] passed in and defensively
copied.

address manhantan calculation when index is exact multiple of dimension
and returns wrong row displaced index.