obj: add support for altering response header values

Change-Id: I07088609b4320203dd8e4c9e6644b3406212a303
test/unit: forbid empty path_info

PATH_INFO cannot be an empty string in the actual use case.  This patch forbids
it in unit tests to avoid adding unnecessary checks in future patches.

Change-Id: I48d4e278538a720d41582118ee69f5a4063c6162
request: return InvalidURI for non-utf8 URI

Change-Id: If8508eb9b49aed1129e70b9c9c6c2a50ddd4be0a
service: ignores subresource queries for service requests

S3 ignores subresource queries for service requests.  For example, the
following request is handled as a GET Service API.

  GET /?acl
  Host: s3.amazonaws.com

This patch addresses the behavior.

Change-Id: I50f3e391048a3a69bc49980212693c1f85bd9d4f
request: add helper to check the target resource type

Change-Id: Ia4e5807fb245057f825361864405db8894cab4ef
cfg: set default values for swift3 config parameters

This makes it clear that what kinds of values are allowed for Swift3 config.
The sample config file is also added to document those parameters.

The default value of 'location' is set to 'US' like AWS S3.

Change-Id: Ifa18346208863cffb05862e062043ecdb35341b7
Merge "cfg: set default values for swift3 config parameters"
Merge "obj: add support for altering response header values"
Merge "test/unit: forbid empty path_info"
Merge "request: return InvalidURI for non-utf8 URI"
bucket: make max_bucket_listing configurable

With this patch, users can limit the maximum number of objects returned in the
GET Bucket response.  The default is 1000, which is the same value as AWS S3
uses.

Change-Id: I70f9aece8fa3e2d14ed02d831c560bc3d4feb172
Fix typo in swift3/response.py

Change-Id: I2b615b9c2563ae6d91da5d8922c36e04a291ac57
Merge "service: ignores subresource queries for service requests"
Merge "request: add helper to check the target resource type"
response: drain response body on error

With the older version of Swift, proxy-logging prints 499 errors if the
response body remains untouched.  This patch fixes it.

Change-Id: I9472cd539b344a988be3b294361e075d9760904e
Merge "Fix typo in swift3/response.py"
Merge "response: drain response body on error"
response: include resource_type in the MethodNotAllowed response

AWS S3 includes a resource_type element in the MethodNotAllowed response body.

Change-Id: Ibbc7ed4bc49dcbcb55c9a4693e75f2af200fb550
Fix Location header of PUT bucket response

Location header of S3 PUT bucket starts with slash.

Change-Id: Ia218774983cb4cae0e888a2af2d59117568e68a9
Clean up Location header in Bucket Response

Response object has 'location' property so this allows
to use that property insetead of headers dictionary.

Change-Id: I26cb0815f3a8699de68ea505844ba2f99804fcac