Normalize path case names for perforce client path comparison.

When checking that the current working directory is within the perforce client,
we weren't normalizing the case of the paths. This was fine on case-sensitive
file systems, like Linux, but broke for Windows systems. Trivial fix.

Testing done: Ran unit tests

Fixes bug 3221.
Don't use _convert_symbolic_revision with 'BASE'

In the case that the BASE revision is not present on the current working
directory (such as when the latest synced change is on a branch, and cwd is
trunk), trying to convert the BASE symbol to a numbered revision will fail.

This change just passes through the string 'BASE' as the base revision, which
should be both more efficient and cover all the possible situations.

Fixes bug 3250.
Fix unit tests for changes to 'BASE' treatment in SVNClient.

We no longer try to convert the string 'BASE' to a numeric revision, so the
unit tests shouldn't expect that. Trivial change.
Execute subcommands using the "C" locale.

A while back, we changed rbtools to exec the various command-line tools it uses
using the en_US locale (so that we wouldn't get diffs with localized strings in
them). This is nice, but annoying when users don't have the en_US locale on
their system. This change updates things to use the "C" locale instead.

Testing done: Ran unit tests.

Fixes bug 3253.

Reviewed at https://reviews.reviewboard.org/r/5498/
Pass p4 port, client, and password on the command line instead of using env.

The p4 client prefers, in order, arguments on the command line, .p4config
settings, and finally P4* environment variables. This meant that if someone had
a .p4config file, and then specified --p4-port and --p4-client with something
different, it wouldn't actually override their file.

I've changed the client implementation to use -p, -c, and -P arguments to 'p4'
instead of setting things in the environment.

Testing done: Ran unit tests.

Fixes bug 2712.

Reviewed at https://reviews.reviewboard.org/r/5363/
rbt should find repositories based on mirror_path

"rbt post -u" doesn't work if the repository is being identified using a
mirror_path - get_repository_id returns None which causes an error trying to do
the update.

The patch matches the logic in commands/setup_repo.py and clients/svn.py.

Testing Done:
Tested locally against reviewboard 1.7 - repo with the path of
http://svn.DOMAIN/svn/foo and mirror_path of http://svn/svn/foo works with `rbt
post -u` when my local checkout is http://svn/svn/foo

Reviewed at https://reviews.reviewboard.org/r/5468/
Associate -p arg with PUBLISH config key.

When implementing the rbt arguments, we missed including PUBLISH as a config
key for the -p argument. This meant that users who had this in their
.reviewboardrc wouldn't get the desired behavior when using 'rbt post'.
Trivial fix.

Fixes bug 3271.
Don't include error stream output in git diffs

We ran into a problem where the diff is generated properly and git doesn't
throw an error, but it prints warnings to stderr during the diff generation.
The error stream content is included in the diff and this creates a corrupted
diff, which causes breakage on the Review Board server. This patch makes it so
that the generated diffs don't include the stderr stream content.

Sample Warning:
   warning: CRLF will be replaced by LF in pom.xml.
   The file will have its original line endings in your working directory.

Testing Done:
We tested that the scenario described no longer occurs when the stderr is not
included in the diff.

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