Apply six for metaclass

The way to using metaclass has changed in Python3.

Python 2.7 way:

class Foo(object):
  __metaclass__ = FooMeta

Python 3 way:

class Foo(object, metaclass=FooMeta):
  ...

The six.add_metaclass() decorator allows us to use one syntax that
works for both Python 2.7 and Python 3.

Change-Id: Ibd31a9f91bac6ec220d802f16c77ee0306e211b3
Closes-Bug: #1236648
Make 'nova ssh' automatically fall back to private address

If no public IP address is available automatically revert to the private address.

Change-Id: Iaf780fde77c4a1eae99c27be7e21841ca87d69dc