Fix how matches are found in search

Instead of keeping track of where the search starts, just
keep track of the number of pages and make sure we don't
visit pages more than once.
Use existing page count in nextMatch
Merge pull request #5325 from fzembow/findcontrollerfix

Update findbar to wrap on initial search