Port to argparse based cfg

Sync the following changes from oslo-incubator:

  479f19c Add deprecated --logdir common opt
  27b2ff4 Add deprecated --logfile common opt.
  9b81289 Allow nova and others to override some logging defaults
  3557d84 Fix ListOpt to trim whitespace
  01ab910 Fix set_default() with boolean CLI options
  af18eaa Improve cfg's argparse sub-parsers support
  f21e1d9 Fix regression with cfg CLI arguments
  ceb4aa7 Fix broken --help with CommonConfigOpts
  5e9503b Hide the GroupAttr conf and group attributes
  b6d24bb updating sphinx documentation
  403509e Don't reference argparse._StoreAction
  e17deb8 Fix minor coding style issue
  0c29e1d Remove ConfigCliParser class
  5b9cb41 Add support for positional arguments
  dbc72a6 Use stock argparse behaviour for optional args
  768a147 Use stock argparse --usage behaviour
  ac180b9 Use stock argparse --version behaviour
  0787e38 Remove add_option() method
  5afead0 Completely remove cfg's disable_interspersed_args()
  5f564b2 argparse support for cfg
  d7b6397 Add a missing comma in a docstring.
  aca1805 cfg: fix required if option has a dash

Changing glance-manage to use argparse sub-parsers does result in an
incompatible change. This no longer works:

  $> glance-manage db_sync --config-file=...

because --config-file is interpreted as an argument to the db_sync
command rather than a global argument. Instead you now have to do:

  $> glance-manage --config-file=... db_sync

The incompatibility is unfortunate, but the new behaviour is pretty
standard.

Change-Id: Ifd43fe6bea4abd7f85ea75e5ae65678b679acd8d
Set Content-MD5 after calling webob.Response._app_iter__set.

Discussed upstream at https://github.com/Pylons/webob/issues/86

Fixes bug 1083155

Change-Id: I75c634880e7abaacdcd416c27391e9fdc4874049
Verify size in addition to checksum of uploaded image

Fixes bug 1092584

Previously only the supplied checksum was verified against the actual
checksum calculated by the backend store, with the image being killed
on mismatch.

Now we also similarly verify the supplied image size, if provided.

Change-Id: I87fa3ff77715111f1095f3ebe64cd699776ec27e
Fix import order nits

Change-Id: I972c463131ba688ab9352590eb53f5b1822ac943
Use imported exception for update_store_acls

update_store_acls uses unimported exception HTTPBadRequest. This patch
changes it to use in the right scope.

Fixes bug 1080991

Change-Id: I82b6488a9b67a27f46f492d0d08a41cd4b7f40c3
Merge "Fix import order nits"
Merge "Set Content-MD5 after calling webob.Response._app_iter__set."
Merge "Port to argparse based cfg"
Merge "Use imported exception for update_store_acls"