Rotate objects around their center instead of the bottom left

This makes the implementation a little bit more complicated, but it
should be more intuitive overall.

This change is mostly about changing the interpretation of the
'rotation' attribute and is not backwards-compatible. However, rotation
support was added recently so I don't expect anybody to depend on the
previous behavior. Eventually the transformation origin could also be
made configurable, if there is a need for that.