Fix commands compatability with RB 1.6.x

Review Board 1.6.x does not provide a 'capabilities' field in the info
resource which causes commands requiring it to fail. We now default
the capabilities to be empty if they can't be found on the server.
Refactor get_root to return an RBClient as well

The get_root method has been renamed get_api and will now return the
RBClient instance along with the root resource. This allows commands
to receive direct access to the API client which can be useful if they
need to update login information after instantiating the client.

A few of the commands have also been updated to make less requests to
the Review Board server by taking advantage of the uri templates on
the root resource.
Introduce the status command

The status command will display the id and summary of each pending
review request a user has.
Add logging of http requests

The method and url of any api request made using the sync transport
will now be logged.
Allow iterating of resource fields

Resources now have an 'iter_fields' method which can be used to
iterate over the resources fields.
Fix the unit test for Perforce moved files.

This was checking the old, global "are moved files supported in diffs"
capability and not the new "Does Perforce support moved files" one.
Fix treating an SVN repo as Perforce by mistake.

This changes the order in which we check for repositories. Perforce was
coming before Subversion, but Perforce would give us a false-positive
due to the fact that it says we have a valid repository so long as
P4PORT is set to something real.

This should be fixed in a more bullet-proof way later, but for now, this
at least makes it possible to use both Subversion and Perforce
individually.

Reviewed at http://reviews.reviewboard.org/r/3525/
Fix --revision-range=SINGLE_COMMIT on git.

Before this, we would generate a diff with

    git diff SINGLE_COMMIT..CURRENT_HEAD

but this is not what was intended and what we write in the docs.
Now, we use

    git show SINGLE_COMMIT

to really only generate the diff of the given commit.

Reviewed at http://reviews.reviewboard.org/r/3926/
Revert "Fix --revision-range=SINGLE_COMMIT on git."

This reverts commit 0c06e1a658d23049af80e211772868285ae0df7a. Diff
generation using git and the --parent option was broken by this
commit.
Fix rbt diff's call to get the API client

It seems the diff command was missed when refactoring the way commands
get the API client. The diff command should now work again.
Make RBClient cookie_file optional

If a cookie_file is not provided it will now default to
'~/.rbtools-cookies'. Also, if we default to '~/.rbtools-cookies' and
it does not exist, we will attempt to copy the old
'~/.post-review-cookies.txt' file over.
Introduce rbtools documentation

Create the configuration for the rbtools documentation and introduce
the initial documentation for the rbtools api client. This
documentation includes a small tutorial, a general overview, and
resource specific functionality.

Reviewed at http://reviews.reviewboard.org/r/3296/
Add documentation for the rbt commands

A page for each command has been added listing a short description and
the options which the command accepts. Eventually these should be
expanded to provide more in depth documentation.

Also, the post-review documentation has been ported from the Review
Board code base. This also served as the starting point for the rbt
post command's documentation.

Additionally, a couple of unused options, which were noticed while
documenting, were removed from the post command.

http://reviews.reviewboard.org/r/3931/
Move docs into a subdirectory.

Move the rbtools documentation into a subdirectory under the docs
directory. This was done to allow for other sphinx docs configurations
such as releasenotes.
Assign documentation copyright to Beanbag, Inc.

List Beanbag as the copyright holder and fix a style error in the
sphinx configuration.
Port rbtools release notes from Review Board repo

Introduces a releasenotes sphinx configuration, and includes
all previous release notes from the Review Board tree.
Update README to include new tools

The rbt command and the API client are now mentioned in the readme
alongside post-review.
Fix diff generation with unedited files in Perforce.

If you make a perforce-backed code review with an unedited (but opened)
file then ReviewBoard chokes on the empty diff content. Based on the
recentness of this issue I suspect that it's regression for us from
upgrading ReviewBoard from 1.5 to 1.6.

This issue has been discussed by others on...

http://code.google.com/p/reviewboard/issues/detail?id=2754

========================================

Steps to repro:

1. p4 edit some/file/with/stuff
2. run post-review

Expected:

Post-review should error out if you don't have any edits. If you have
other modifications then it should just make a code review with that.

Actual:

Post-review always succeeds, but the unedited file renders as a
stacktrace in ReviewBoard.

Fixes bug #2754
Reviewed at http://reviews.reviewboard.org/r/3944/
Move release notes up one directory

The *.txt files for each release now live in the top level directory
of the release notes, instead of the 'rbtools' directory
Release rbtools 0.5

Provide the release notes for 0.5, and bump the version number.