Fix issues with insert() and subqueries.

insert queries should accept subqueries as values for columns. This lets
the query builder be more composable and cover even more use cases
without much overhead. I've also added the missing traverse()
implementation as @lorenzo pointed out.