DB module now compatible for python2 and python3 using library six

Used library six to make webpy compatible for both python2 and python3. The PR has been tested on sqlite database. Testing other databases as well.