Fix sqlalchemy storage driver for Python 3

The sqlalchemy.BINARY and sqlalchemy.LargeBinary in Python 3 works with
'bytes' not 'str'. This patch adds explicit proper encoding/decoding
before saving such fields.

Partially-implements: blueprint py3k-support
Closes-bug: 1321840
Change-Id: Iddeeab3bee84fecea43551d3f2924973e917382c
Merge "Fix sqlalchemy storage driver for Python 3"