Add a register-nodes command and associated API

As a first step of making register-nodes cleverer, port it from shell
to Python, making use of the subprocess module to call nova or ironic.
This slightly changes the interface, in that ironic usage is detected
via Keystone, rather than use of an environment variable. As an added
bonus, it is also tested and documented.

Change-Id: I0d9ef1b3f19c55ed5b696871303a66808c3cf658