Show states as subtype in toplevel menu, for controls and sensors,
as we were already doing for outputs and areas.

So now you can navigate from the toplevel to /sensors/closure:open
instead of just /sensors/closure, like was already possible for
outputs.

There's definitely room for some factoring out of a common snippet here.