Standardize base.py with novaclient

Main changes:
* deprecate api variable in favour of client
* add documentation
* use to_slug from oslo strutils
* remove Python 2.4 support
* other small fixes from novaclient

Change-Id: Ife54fd3207798ee03101a48bc1cda3b3f62cc5e4
Fix and enable gating on F811

Fixes duplicate method definitions and enables gating on F811

Change-Id: Ic360e70d13da864b8b5c10fc5e731b3952b2d2e8
Fixing potential NameErrors

Fixing a couple locations that could potentially raise NameErrors
instead of intended exceptions.  These were found by looking at
flake8 F821 (undefined name) errors.

Added in unit tests to verify NameErrors would not be raised.

Change-Id: I8619cb0be495b814335a5aea23daca025484d3c6
Merge "Fixing potential NameErrors"
Merge "Standardize base.py with novaclient"
Merge "Fix and enable gating on F811"