Support document access strategy failover

Detect when scanning with the selected document access strategy fails,
and try to fall back to other strategies.

(This will allow using the Dummy strategy when d-t-m fails for some reason.)

Also, fix TextPosition strategy to avoid crashing without d-t-m.
@aron :

> Okay, CoffeeScript is nuts.

Now that's pretty much a given anywhere near JavaScript land, isn't it? 

@nickstenning: 

> Let's just use JavaScript.

You got that in 129701b45a135222579e836bcfaceec3f09edd18.