SQLAlchemy error patterns improved

SQLite has new error messages since 3.7.16.
DBDuplicateEntry is now recognized correctly.

Change-Id: I86e9673ac409b3b3e881bea7cb8b3516f320388d
Fixes: bug #1259915
Encode response from FakeHTTPClient

While working on [1], found that python 3.3 gate is failing [2].

In python 3.3 requests library expects response to be encoded. So encode
the same if it is not already.

Also add test for FakeHTTPClient.

[1] https://review.openstack.org/#/c/58067
[2] http://logs.openstack.org/67/58067/4/check/gate-python-solumclient-python33/15dc135/console.html.gz

Part of blueprint make-python3-compatible

Change-Id: I9af04e52bfa38f5c943dbc4929abb5e3161ef9b4
Merge "Encode response from FakeHTTPClient"
Merge "SQLAlchemy error patterns improved"