Add os_tenant_name to bin/swift and common.client

- Make sure we have a tenant_name when doing get_auth for 2.0
  auth_version.

Change-Id: I02dceb03f224c8fb91972e1f0e2925e5d1a06640
Unify different ring-balancing methods.

RingBuilder._initial_balance() gathers partitions differently from
.rebalance(), but the assignment algorithm is the same. However, there
were two nearly-identical implementations; these have been combined.

Also extracted a couple of utility methods to reduce duplication.

Change-Id: Ia5442782a8285dc14aa9a93878a7b0e8d1bb1be5
updated docs for domain remap and cname lookup middleware

Change-Id: I1c571951f25a6e724cdd4699eb94baad5e47eb95
Removed unused imports.

Change-Id: I5a837bea8699b78484265dc2434b190d0cf15de2
Use options.os_auth_url rather then environment variable

If you do specify --os_auth_url rather than using the environment variable
OS_AUTH_URL, you'll end up with different behaviour.

Change-Id: I7430c2a619487375427b1c377ce00245eff107ff
wsgi pre_auth fixes

Change-Id: Idb84bd6800c047ce1080039434b7957aa7d69b4d
Merge "Add os_tenant_name to bin/swift and common.client"
Added db_preallocation setting to replicators

Somehow I forgot the account and container replicators with the last
db_preallocation patch.

Change-Id: I1a42ef000d60b59aedb113d91485319d6919bc36
Make swift client easier to wrap

In the process of wrapping for profiling, a trivial wrap with def main()
ended in a ton of these:
    NameError: global name 'parser' is not defined

A closer investigation revealed an apparent confusion in argument names.
The problem was introduced by commit 985968f76550251904b64d12de025fa5d65ed03f
of November 2010. Note that Greg fixed st_delete() correctly in that one,
but apparently forgot the others.

Unit tests pass for both current (bad) code, and the patched code.
By the magic of Python scoping, current code works, just impossible
to wrap for a quick hack.

Change-Id: I18f2494ce2a201d04d49f99ea259d141939dcb6a
Fix colorization of "hash" in SAIO doc.

Admittedly, this is ridiculously trivial, but the coloring of
"hash" always peeved me. Not so much that it existed, but that
I did not understand what caused it. After consulting our Sphinx
experts, it turned out that the code block was considered code
in Python and "hash" is a reserved word in Python, so it was
colored.

One option is to declare the code block "ini", which is what
it is, but that causes the block stand out just as badly, unless
we highlight every one of them. So, for now use "none".

Change-Id: Icee021fc30839eeb02cd3e232ff6be92ed32df52
Merge "wsgi pre_auth fixes"
Removed SCRIPT_NAME from preauth env

Change-Id: Iaf5f7011cf41f503b7ccdea671cd31a0466f5248
Fixed grammar and improve docs.

Corrected its/it's mistakes, harmonized line wrapping within some docs
and clarified doc wording in several places.

Change-Id: Ib9ac6d5e859f770a702e1fad6de8d4abe0390b47
Appending some new information to proxy, account and container config manpages. Adding object-expirer files and swift-orphans as well. Also making some minor modification on the other files to stop lithian from complaining during package creation checks. Adding name to Authors file.

Change-Id: Id68231ced070b27d1f7fb5a230d345694632e7dd
Merge "Fix colorization of "hash" in SAIO doc."
Merge "Appending some new information to proxy, account and container config manpages. Adding object-expirer files and swift-orphans as well. Also making some minor modification on the other files to stop lithian from complaining during package creation checks. Adding name to Authors file."
Merge "Use options.os_auth_url rather then environment variable"
proxy to be able to deny request to invalid hostnames

Change-Id: I974f729da60e5ab9453daf9e52466b3e1af5c69b
fix when deleting a versioned object when the version target container is missing

Change-Id: I16a8d1f5543d62a6d968bf1b9f52f319902437cb
Allowed the proxy to pass on the X-Timestamp header.

Change-Id: I31a64614231391b52855b88220319b2359bea142