calibrator: Use G_STMT_START/END on SWAP define

And let it pass the type, so it can be used on other than integers.

https://bugzilla.gnome.org/show_bug.cgi?id=732442
wacom: Fix x/y ranges' swapping when calibrating on rotated screens

The previous axis swapping code would oddly rely on the input coordinates
remaining on untransformed device coordinates, while those are gotten on
screen coordinates (hence rotated), this would cause swapping not to kick
in, and result in swapped X/Y scaling to be applied to X/Y ranges.

So make the axis swapping code be calculated upon screen coordinates, as
the collected points already are, and swap the applied scalings if
necessary.

Also, the code that swapped coordinates before returning to the caller
would scramble min/max values when swapping x/y. Fix that too, minimum
and maximum should stay like that when swapping axes.

https://bugzilla.gnome.org/show_bug.cgi?id=732442