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

After conversation with folks from WMF (Roan and Ed) I refactored ve.ce.FocusableNode so it decouple calculating node dimensions and drawing highlights. It allow for retrieving and using these dimenstions without having to draw highlights (which is exactly what's needed for FocusWidget - the node mode).

This refactoring makes certain path in code less optimal but after testing it I didn't notice it to affect anything in a visible way.

Ported from upstream handy method: getBoundingRect.

WMF is interested in this fix/refactor as well, so we will be pushing it upstream.