bug fixes, restructuring, more verbose errors

all query error handling is centralized and based on the highest level
'request query' from the frist time a query object it written to
the outgoing pipeline. This is simpler and resolves some ordering
issues that could prevent channels from closing.

added some extra more verbose reporting for query errors that includes
eg. the stack trace

more proactive about removing handlers from the pipeline - mostly
to resolve aforementioned ordering issues

the three tier promise system is now a little more explicit and
centralized. likely not the ideal solution but for now this works
pretty well, and at least the relationships between the query states
are clearly defined in a single place.