Fix for the Solr fragment/HOCR mismatch.

Solr fragments seem to leave out punctuation at the start or end of
fragments; therefore, we now grab non-whitespace on directly on
either side of the fragment, so we should be able to match full phrases
which start after something like a parenthesis, to the end punctuation.