Listen to close events on window sets to give focus back to the surface

Eventually the window set won't know about its surface.

Change-Id: Ia2bdf65e6c8ff70829d0b0cbb403a203be832e7e
Set content directionality on the model

Currently we set it on the view then poll it from there using .css
which is evil. We can set this information on the model then have
the view apply the appropriate CSS.

Change-Id: I2065e17020dc89964b1040ddc4f8d11f9b742d24
Use #isContentOffset instead of slug detection for word expansion

Because slug detection requires talking to the view, which is evil
(and soon-to-be impossible).

Change-Id: I5583452573a13d87f2865a2a6716384939059c5f
'The great ' + getRandom(classList) + ' rewrite of ' + new Date().getFullYear();

> getRandom(classList);
> ['ve.ui.Dialog', 've.ui.Inspector']

* Don't pass surfaces to windows, just fragments when they are opened
  Windows should only be interested in the model. The also need to know
  the range that existed when the dialog was opened as it will be cleared
  when the parent surface is blurred.

* Also pass content directionality from the view because RTL is evil

* Add getSelectedNode to SurfaceFragment as windows may need to know
  which node was 'focussed' when the dialog was opened.

Change-Id: Idd78bf9e4d50635b707bacce06f6c14babcf33a8