Database refactory

Main goals are:
(1) To clean up Peer table and PeerDBHandler.
(2) To clean up Torrent table and TorrentDBHandler.
(3) To simplify sqlitecachedb.py.
(4) Review other DBHandlers.