Display useful errors when failing to load branches or commits.

In the New Review Request page, if there's any sort of issue loading the
list of branches or commits from a repository, the result is a blank
list of branches or commits with no error message, and an error e-mail
sent to administrators. This is not very helpful.

Now when there's an error loading any data from the server, an error
box will appear saying there was an issue loading from the server,
and showing the server-provided error message. The user will be given
the option to try the request again.

For this to work, RepositoryBranchesCollection had to be made a subclass
of BaseCollection, and BaseCollection had to be given support for
parsing and storing errors on the xhr, similar to what BaseResource
does. This code has been pulled out into a common function that both
classes now use.

The RepositoryBranches and RepositoryCommits resources now return a
proper error code when encountering a SCMError. We're reusing the "Error
fetching information from this repository" error, with a custom message
(provided by the SCMError).

Reviewed at https://reviews.reviewboard.org/r/6267/