Fix lookup plugin for py3.5 support
Fix lookup plugin for py3.5 support

in py3 basestring is no longer valid so we need to support basestring
for as long as we support py2 but we also need to have a way to carry
forward seemslessly. A try and except block has been added to allow us
to support both.

Py3 also will not allow us to "sort" a dict, while this was allowed in
py2 it didn't do anything however in py3 it causes a stacktrace. To fix
this issue a try/except block has been added to catch the type error and
simply set the value without sorting it.

Change-Id: I81c135c5bf0867f7faea248457494547cbcd87cd
Signed-off-by: Kevin Carter <ffb54fded2f22052678e45d78b58d223654eb6fa@rackspace.com>

openstack/openstack-ansible-plugins,openstack/openstack-ansible-plugins,os-cloud/openstack-ansible-plugins,os-cloud/openstack-ansible-plugins