Initialize end_of_result to 1

The global variable end_of_result is now initialized to 1, to show that
the initial state is a finished result set. With this done, the
query-string length check in performPrefixNextPage which skipped the
query when the string was empty could be removed which in turn
fixes #365.
Merge branch 'nextpage_empty_search'