Start using more typed units in the compositor

Now that rust-layers is starting to support typed units, we can use
them more thoroughly in the compositor. This is a step toward removing
as many untyped units as possible.
Merge pull request #3173 from mrobinson/typed-units-1

Start using more typed units in the compositor