Issue 95: Make sure type=stream posts only are deleted on clearing DB

Because we're not simply wiping al the tables anymore, I first do a query to select the ids of the items we want gone, and use those ids in the subsequent DELETE statements.