fix issues from autopep8

- from __future__ needs to be first import
- dont enforce is None for sqlalchemy code
- support '__contains__' for PropertyMixin on top of 'has_key',
  so that autopep8 change from has_key to 'in' works
- use isinstance instead of type(x) in types.StringTypes
- fix one meaningful trailing space in a multiline string

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
disable E711 just for db code

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
REVERTME: use except E,e: syntax

except E as e: syntax is python2.6+

revert when we drop support for 2.5

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>