Fix pagination of search results

In passing, also make the "All" link always available when searching,
to get out of search mode.

Fixes #706
Back out debugging change accidentally committed

The invoice system will really suck with a pagination of 5...