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.
Fixed in 
https://github.com/hypothesis/annotator/commit/b9ddfc1fa8f18720115e782394a5641e68687363

2014. nov. 6., cs 15.43-kor-kor, Aron Carroll 
<notifications@github.com> írta:
> In src/plugin/textposition.coffee:
> 
> > @@ -106,7 +106,11 @@ class Annotator.Plugin.TextPosition extends 
> Annotator.Plugin
> >        console.log "Warning: 'end' field is missing from 
> TextPositionSelector. Skipping."
> >        return null
> >
> > -    content = @annotator.domMapper.getCorpus()[selector.start .. 
> selector.end-1].trim()
> > +    corpus = @annotator.domMapper.getCorpus?()
> > +    # This won't work without d-t-m
> > +    return null unless corpus
> > +
> > +    content = corpus[selector.start .. selector.end-1].trim()
> can be written as content = 
> corpus[selector.start...selector.end].trim()
> 
> —
> Reply to this email directly or view it on GitHub.
> 
=