Refactor manage.py to be more easily callable by wrappers.
Review Request #3854 — Created Feb. 7, 2013 and submitted
Refactor manage.py to be more easily callable by wrappers. This fixes up manage.py so it can be called with a custom settings file by a wrapper (such as another manage.py script). There's now a 'main' function that takes a settings module and operates on that, instead of assuming it's using the 'settings' module from reviewboard.settings. By default, of course, this is reviewboard.settings. This is used by RBCommons to reduce code duplication, since we want the same logic, but a different settings.
Tested devserver and unit tests with RB. Tested the wrapper in RBCommons.