Loads of tests for mapmapper.sql.transform, some bugs squashed accordingly