Adds do-query-dao and do-select-dao

These macros are analogous to doquery, but allow you to iterate over DAO instances rather than just raw lists of column values. Includes some code changes (but hopefully no functional changes) to select-dao and query-dao to minimize duplicated code.