Add a Backbone collection for filtering other collections.

This adds RB.FilteredCollection, which presents a filtered view of
another collection. FilteredCollection takes a dictionary of filters,
which map field names to values. For string fields, the prefix will be
compared, and for other values, direct comparison is used. This can be
expanded as needed down the road to do more complex matches.

When the main collection updates, the FilteredCollection will update as
well, according to the filter.
Add some infrastructure for JavaScript-controlled config pages.

This is a port of some of the code in RBCommons used to handle the
admin and My Account pages. It provides some CSS and JavaScript to
display lists of items with optional actions for config pages.

This is, for now, intended to be a subset of the infrastructure used in
RBCommons, and is just enough for the new My Account page. Going
forward, we'll likely extend this for new bits of UI and things like
better dynamic loading of data.
Fix deleting file attachments without a draft.

File attachment deletion was broken without a draft, since destroy()
doesn't call ready() first, causing the draft to never be created. Now
destroy() does an ensureCreated() on the draft.
Filter out replies when calculating issue counts.

Issue counts on review requests were going up when replies were made to
comments with issues. This happened because we looked for all comments,
and not just top-level comments, when calculating issue counts and when
deciding whether to increase issue counts.

We now limit these only to top-level reviews/comments.

I also noticed that we were bumping the last review activity timestamp
even when a review was still in draft mode. That's been fixed so that
the value is only updated when the review is public.
Update the manual fixtures for the issue counter fields.

This ends up being a large-looking change, since Django changed how it
represents dumped data. This is just the original fixture loaded in,
with issue counters, and dumped back.
Improve the Markdown escaping logic.

This improves our Markdown escaping to better handle parens,
underscores, and asterisks.

The common cases of showing function names with parens and underscores
should no longer result in a bunch of escaping. We now do a better job
of escaping only when they're going to cause formatting changes.

Since some of the regexes were getting a bit longer, I've also
repositioned the comments in the regexes to appear before the regex
lines.
Rewrite the My Account page.

This is an extensive rewrite of the page that provides better
organization and extensibility, based on the equivalent page in
RBCommons.

The new page provides a navbar on the side for navigating the various
account preference "pages," which are shown in the main content area.
Each "page" can show one or more forms for changing preferences.

The biggest change in content is the Groups page. Instead of a terrible
flat list of checkboxes, we now display every group in a clean list,
with buttons for dynamically joining or leaving the group. The group is
also filterable, making it easy to find a group you want.

The whole infrastructure is designed to be extensible. While the hooks
aren't there yet, everything below them are. Pages can be registered or
unregistered, and the forms on a page can also be registered or
unregistered. This will later let extensions provide their own
preferences for each user.
Fix some unit test breakages from my Markdown change.

Looks like I didn't include some of my unit test fixes in the webapi as
part of my Markdown change. This commits those changes, which just
simplifies the expected escaped strings to not require escaping "_" in
the middle of words.
Fix creating a new review request from the first committed change

Creating a new review request from committed change by selecting the first/root
commit in a linked GitHub repository failed because the root commit has no
parents. This raised a SCMError when trying to fetch the "compare two commits"
API.

The fix is to check if "parent_revision" is empty before trying to fetch
"compare two commits". If "parent_revision" is empty, it fetches the root
commit itself.

Testing Done:
- Manually created new review requests for a root commit with 1 changed file
  and for multiple changed files, and verified that "View Diff" listed the
  expected changes (for both a private and a public GitHub repository).
- Ran unit tests.

Bugs closed: 3207

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