VE-1477: Hide selection and context menu while Template dialog is open

When I talked to Inez about this, I said that he probably shouldn't bother maintaining a cache when there are no highlights, because the events you need to clear that cache at the right time won't be bound (and shouldn't be, IMO, for performance reasons). Measuring the bounding rect of a non-highlighted node should be rare enough that the cache isn't really needed, so I recommended only using the cache while the node is highlighted.

Does that make sense?