Fix an AttributeError in the github post-receive hook.

Sometimes, the payload for the post-receive hook doesn't have a ref name. I
believe this occurs when pushing things other than refs like tags or branch
heads. In this case, we don't want to try to call None.startswith().

Trivial fix.
Trivial fix for parsing ReviewGroup payloads.

My recent change to enable parsing ReviewGroup payloads didn't
transition correctly between my repositories. I ended up placing the
'rspNamespace' on the wrong object. Now parsing works correctly again.
Fix a bunch of pyflakes warnings.

Fix up things that have snuck in over the past few months. Trivial changes.

Testing done: Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/5733/
Fix a couple hard-to-translate strings.

Strings which use multiple format operators without naming them are hard to
translate. Switch over to the dict-formatting for these instead.

Testing done: Extracted the message catalog and didn't see a warning.

Reviewed at https://reviews.reviewboard.org/r/5741/
Update locale files for Review Board.

This change bundles together three things:

* Extracted all newly-introduced strings.
* Added all translations and updated strings from transifex (including a few new
  languages that have small numbers of strings)
* Removed LANGUAGES from settings.py, so that we can just fall back on Django's
  list, which is much more comprehensive.

Reviewed at https://reviews.reviewboard.org/r/5743/
Add publishing signals

This adds "publishing" signals, executed before any data is saved.  The
intention is that an extension can block publishing if, for example, there's a
problem communicating with an outside system, by raising an exception.

I added a PublishError class and made web API publish functions turn them into
WebAPIErrors.  This is the part I'm least certain about.  I want to allow
extension to define the errors, but it doesn't make sense for the publishing
signal handlers to be throwing WebAPIErrors directly.  The compromise I came up
with was to just put the PublishError string into a generic WebAPIError with a
special user code of 999.  Other ideas welcome; I just wanted something to
start a conversation.

The ReviewRequestEditor model already had some basic error handling (a simple
alert dialog).  I added similar error handling to DraftReviewBannerView and
ReviewReplyDraftBannerView.  As far as I can tell, that covers all interfaces
to updating (publishing) reviews, review requests, and review replies.

Testing Done:
All tests pass except some VCS-specific ones, which were skipped.  I also did
some manual verification of the full system by throwing PublishError exceptions
in an extension and verifying that the message appeared in an alert box in the
UI.

Reviewed at https://reviews.reviewboard.org/r/5723/
Fix duplicate "Markdown Reference" links.

MarkdownEditor could end up creating duplicate "Markdown Reference"
links when opening the same editor more than once. An easy repro case is
to draft a reply, save, and open it again. Every time that is done,
there would be an extra link.

We now check for the existence of a link before attempting to add one.

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