Use pretty permalinks by default in the test suite

Description

There are 118 instances of $this->set_permalink_structure( ... ) in the test suite. The majority of these calls are present simply to enable pretty permalinks, regardless of the permastructure for posts.

Pretty permalinks should be enabled by default for the test suite. Let's try it and see if anything breaks.

rest_url() inconsistent addes slashes to the passed path depending on whether the site has pretty permalinks enabled. Apart from being inconsistent, this also caused the unit tests to fail when pretty permalinks are enabled.

The patch above contains the code that makes all the tests, except three multisite tests, pass with pretty permalinks enabled. I was unable to fix these, so I'd be happy if somebody else could look into this.

Tests_Query_VerbosePageRules: This keeps failing no matter what I try. The way WP_UnitTestCase::goto behaves is not very transparent, and I can't figure it out.

Tests_Rewrite_OldSlugRedirect and Tests_Feeds_RSS2 pass on local, but fail on Travis.

A few notes about the patch:

I did not account for non-Core test runs at this point. We could add a bunch of WP_RUN_CORE_TESTS checks, but I feel like a more elegant solution would be welcome.

I introduced helper functions for permalink handling. I'm not a fan of stuffing everything into WP_UnitTestCase if it doesn't need to be part of the class. The helper functions are also more efficient, as UnitTestCase::set_permalink_structure calls WP_Rewrite::init twice.

I did only adapt the existing tests so that they pass. This might not always be the past way for the thing being tested.

rest_url() inconsistent addes slashes to the passed path depending on whether the site has pretty permalinks enabled. Apart from being inconsistent, this also caused the unit tests to fail when pretty permalinks are enabled.