Update use of open() in object API

* Switch to use io.open() for py3 compatibility and simpler testing.
* Open files in 'rb' mode to avoid translation on Windows

Previously tests simply relied on files that were present in the
repository to run tests using open().  Change the filenames to ensure
that no longer happens.

requests_mock doesn't have a way to match against the request body for
PUT/POST; an attempt to add a new Matcher to do that worked but it
needs to subclass the currently private adapter._Matcher class or
duplicate most of its functionality.

Change-Id: I8c30b41db20af8ecafe67e760e872fc08adec905
Close files on image create

The file opened for --file was never closed.  Close it if it is a
file object.

Change-Id: I7bd120a2413de42339771d01e8fd1894d38c3011
Close files on server create, add tests

The files opened for the --files and --user-data options were never
closed, potentially leaking memory in a long-running client. Close
them if they are file objects.

Add a couple of basic tests for server create.

Change-Id: I1658b0caa2d6af17308149cb52196ee28266ddf2
Include support for using oslo debugger in tests

Simply run `tox -e debug <test_name>` to get an interactive
debugging prompt

Change-Id: I09e5b844a33c2f0fd4230f01fbc6c0aa8d752545
Merge "Include support for using oslo debugger in tests"
Change --os-auth-plugin to --os-auth-type

User's don't know what a plugin is.

* Internally, os_auth_type and/or auth_type represents what the
  user supplied.
* auth_plugin_name is the name of the selected plugin
* auth_plugin is the actual plugin object

Plugin selection process:
* if --os-auth-type is supplied:
  * if it matches against an available plugin, done
  * (if it can map to an availble plugin type, done; TODO in a followup)
* if --os-auth-type is not supplied:
  * if --os-url and --os-token are supplied, select 'token_endpoint'
  * if --os-username supplied, select identity_api_version + 'password'
  * if --os-token supplied, select identity_api_version + 'token'

Change-Id: Ice4535214e311ebf924087cf77f6d84d76f5f3ee
Merge "Update use of open() in object API"
Merge "Change --os-auth-plugin to --os-auth-type"
Merge "Close files on server create, add tests"
Merge "Close files on image create"