selection: ensure that `this.range` is defined

In `getContaining()` and `placeMarkers()` functions.

Prevents uncaught errors as described in #204.
@bradvogel I don't follow you. Can you provide more details with regards to how, when, and why you're creating a selection when the editor doesn't have focus?

We have a separate issue for async transactions: https://github.com/guardian/scribe/issues/199