This function decomposes a general 2D transform into skew, scale, rotation and translation. Tests included.