Fix default value for HostingService._http_request headers parameter

The default value for the 'headers' parameter to the _http_request was None,
which meant that if something called it without passing in headers,
urllib2.Request()'s constructor would throw an exception. Other similar code
uses a default value of an empty dictionary, which is more appropriate.

Reviewed at https://reviews.reviewboard.org/r/4392/
Allow HostingServices to validate repositories.

A HostingService may know best whether a given repository configuration
is valid. In the case of HTTPS-backed repositories, it's actually
preferable that the HostingService does the check, since the Repository
entry may not have an associated username/password stored.

Now, when validating repositories, we go through the HostingService, if
one is selected. That will fall back to the SCMTool's validation, unless
a subclass overrides validate_repository and provides this
functionality.

The webapi implementation of repository validation does not make use of
this, since at that level, there's no information on the hosting service
data. When repository configuration is rewritten, that may change. For
now, it's assumed that anyone going through the API is just setting up
standard repositories in-house.

Beanstalk will be making use of this in an upcoming change.