sdb module: add backward-compatible support for Python 3.3+

test_db.py doesn't work for currently code already, and I fear it would be a big job to fix it...

All integration tests passed.
Okay, I didn't considered of this :P

Was thinking like since those two methods are not defined into type_map, no one would be calling into it in Python 3.x...

Will update soon.