[db] reorganizes some code into more useful units
[db] BaseAdapter needs to know about topology types
[db] removed qt_view specific code from base_adapter
[db] adds ascii_view
[db] adds ascii_view to run
[db] removes old demo code from run.py
[db] adds in missing BlockItem release()