Finally done.

All tests are passing now. The problem yesterday was with
next-shifted-square implementation, which was too naive and actually
haven't generated *all* the possible squares.

Changed the logic of generating next-shifted-square by introducing
reset-row function, which resets the row into its original state.

The logic behind the new next-shifted-square is that we start from the
top trying to shift the row which we can shift and stop there combining
the rows processed (see below) before, current row and all the rest.

If the row can't be shifted then reset the row and try to shift the next
one. If no one can't be shifted no new square can be generated.