Add x-remove-versions-location for feature: disable versioning

We can set x-versions-location empty to remove this header in API, but
to keep consistent, we should allow x-remove-versions-location too. The
usage is post "x-remove-versions-locaion: x", just like ACL remove
headers.

Fixed: bug #1107592

Change-Id: I1271eec6401d4a0e8c1a7c2d63aeb8dfef00bf6d
Allow all headers requested for CORS.

- We allow all headers requested in preflight request. The CORS
  specification does leave the door open for this, as mentioned in
  http://www.w3.org/TR/cors/#resource-preflight-requests
  Note: Since the list of headers can be unbounded
  simply returning headers can be enough.
- This is a followup to review:
  https://review.openstack.org/#/c/24415/.
- Fixes bug 1155034.

Change-Id: If7b8f2f3a581c5209892d1ccc9f06ddb8fac92dd
Refactored lists of nodes to contact for requests

Extensive refactor here to consolidate what nodes are contacted for
any request. This consolidation means reads will contact the same set
of nodes that writes would, giving a very good chance that
read-your-write behavior will succeed. This also means that writes
will not necessarily try all nodes in the cluster as it would
previously, which really wasn't desirable anyway. (If you really want
that, you can set request_node_count to a really big number, but
understand that also means reads will contact every node looking for
something that might not exist.)

* Added a request_node_count proxy-server conf value that allows
  control of how many nodes are contacted for a normal request.

In proxy.controllers.base.Controller:

* Got rid of error_increment since it was only used in one spot by
  another method and just served to confuse.

* Made error_occurred also log the device name.

* Made error_limit require an error message and also documented a bit
  better.

* Changed iter_nodes to just take a ring and a partition and yield
  all the nodes itself so it could control the number of nodes used
  in a given request. Also happens to consolidate where sort_nodes is
  called.

* Updated account_info and container_info to use all nodes from
  iter_nodes and to call error_occurred appropriately.

* Updated GETorHEAD_base to not track attempts on its own and just
  stop when iter_nodes tells it to stop. Also, it doesn't take the
  nodes to contact anymore; instead it takes the ring and gets the
  nodes from iter_nodes itself.

Elsewhere:

* Ring now has a get_part method.

* Made changes to reflect all of the above.

Change-Id: I37f76c99286b6456311abf25167cd0485bfcafac
Correcting output of swift-ring-builder

Indent swift-ring-builder output was changed according
with old style (before implementation of region tier).

Change-Id: I0d1cc7acdc5baf86f343745aea6fc2120838fd36
fix probe tests to work in a VM using mount_check

If mount_check is true (ie an SAIO with "real "devices, not loopback),
then the servers will correctly return 507 when given a nonsense path.
The first element is treated as a drive path, and that path isn't
mounted. This patch adds 507 as a valid status response to the server
check.

Change-Id: I1d1bb0ab78fd9ea17323635da7e686182fbdbf13
slobjects can not be made of other slobjects

Change-Id: Ib500f5fc2e890c3d23641350815a910168bcd543
Merge "fix probe tests to work in a VM using mount_check"
Expirer now quotes names when deleting

Change-Id: I5c615c6f32967510f09b783b1ba7089119f1d8bd
Merge "Correcting output of swift-ring-builder"
Merge "Refactored lists of nodes to contact for requests"
Merge "Allow all headers requested for CORS."
Merge "Expirer now quotes names when deleting"
fix slo docs

Change-Id: I49f8c272457547d8aae853986573549828d2503a
Merge "Add x-remove-versions-location for feature: disable versioning"
Merge "slobjects can not be made of other slobjects"
Merge "fix slo docs"
Drop cache after fsync

Drop the cache (fadvise) after calling fsync to avoid redundant work
in the kernel visiting pages that are dirty. By dropping cache after
fsync(), the pages will be clean so can be easily removed from the
cache.

Change-Id: I3013d2ac1e27bbe43e58a81638d04805f5e2ae6e
Signed-off-by: Peter Portante <peter.portante@redhat.com>