backends: refactor transform string parsing

Most of the backends do their own parsing of transform strings, so let's
put that all in the same place (compositor.c/h)