Adds support for transform.matrix on DisplayObject, also fixes some weird matrix issues

For some reason the last pull request disappeared when merged.
Here it is again in a new branch and already merged with the latest changes.