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.