Add the 'visible' parameter into the repository API.

This change exposes the 'visible' field in Repository through the API. This can
be retrieved and updated through the API, and the list URL now has a
show-invisible query parameter which will list all repositories, not just the
visible ones.

Testing done:
Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/4378/
Introduce PageManager for dealing with the page state.

PageManager replaces manual access of RB.currentPage. It allows setting
and getting the current page, and hooking up callbacks for when the page
is set and when it's fully ready (set + DOM rendered).

There's ever really one PageManager that code will interact with. As a
convenience, PageManager has a few forwarding functions that operate on
the instance. They're mostly pass-through, with some convenience around
attributes.

The templates have been updated to use the new functions. In some cases,
we still enclose the call to PageManager.ready() inside a
document.ready(), just because "RB" doesn't exist yet.