Add optimised method hasAnnotationsInRange

Selecting the whole document causes the ClearAnnotationTool to
aggregate all the annotations in the document and check if it is
an empty set. This can be improved with a custom method that bails
at the first sight of an annotation.

Change-Id: I2815d45a21454b11fbd04541469192b2da39511e
Merge "Add optimised method hasAnnotationsInRange"