ported db queries to new style

Hello @sjkaliski, 

Please review the following commits I made in branch 'david-bowery-style-db'.

9b446968435c1542ba87e95b3e23a3e1b1fe7f9a (2013-08-10 18:24:26 -0700)
ported db queries to new style
v1 for new db wrapper (get/put)

migrate trashwang to bowery style db calls

fixed db driver to support more query types

updated getPartyById node

saving broken code. getPartyById isnt working

finished porting everything to bowery style db


R=@sjkaliski