Use HTTPretty mock server for tests

Rather than mocking individual parts of httplib ourselves. This should be
more reliable, easier to read, and will allow us to switch the HTTP client
library more freely. The tests remain functionally the same.

We have to specify this as a test dependency in two places because
`setup.py` doesn't have any way to specify build/test only dependencies.
Split request test for API key

The existing test was asserting two separate things. Partly because it was
easier that way using the old non-HTTPretty mocks. Now that we get two
objects it makes sense to test these separately.
Use requests HTTP client library

This is a lot simpler to use and will make the upcoming handling of cookies
much easier to implement. I think the reason I didn't use requests
originally is because we were installing the lone Python script onto a
server using Puppet and would have needed to describe the dependencies
separately, but now that we're using `pip` it will be handled for us.

NB: You'll need to delete your existing `.tox/` directory to pick up the new
dependencies due to this bug:

https://bitbucket.org/hpk42/tox/issue/93/environment-is-not-recreated-when
Catch non-200 responses from the API

These should raise a `KeyError` because the body wouldn't be JSON and/or
contain a `data` section. However it's better to be explicit, especially
when we may use HTTPretty and status codes to assert a particular order of
responses.
[#58408058] Support user/pass authentication

As an alternative to the API key, because the API key is global across a
Fastly account and doesn't support any role-based access controls.

Use requests' session management to automatically handle cookies for us. Old
cookies will be expired automatically and a new cookie will be requested if
there aren't any available.

This was previously blocked by a bug that caused a very long delay between a
cookie being issued and it being valid to use. This has now been fixed:

- https://gist.github.com/dcarley/8100039
- https://fastly.zendesk.com/requests/3047
- https://fastly.zendesk.com/requests/4736

We need to add an `api_key` to `test_response_json` because
`request()`/`auth()` now expects some authentication method.
Force a new cookie if due to expire in next 15secs

In order to guard against the risk of a cookie expiring during our request.
Reset self.session during config()

This ensures that any existing authentication headers or cookies will be
dropped if a new configuration is passed to the same object. One such case
would be changing from API key to user/pass authentication.
Merge pull request #2 from gds-operations/58408058-user_pass_auth

[#58408058] Support user/pass authentication