cleaned-up pagination function with better WP internals and wrote tests for search
removed trailing slash from page links, updated pagination tests
Merge branch 'master' into 212_search_pagination

* master:
  Changed wp_title test to match proper WP_UnitTestCase methods for setting current page