Added new brick-type "swap"

If a brick is on top of swap, and there is more
than 2 of those brick in total in the puzzle, swap
will cycle the type of that brick to another type of brick
that is also used in the same puzzle.

For example, if a puzzle contains 2 type1 and 2 type2 and 3 type3
and a type3 is placed on top of swap, that brick is changed, first
to type1, then type2 and then type3 and all over again.

Also cleaned up a bit in the way solvability detection is done.