improved multi-query support in the db object:
improved multi-query support in the db object:

+ db::add_query(...) - add a query to the batch queue. prepares the query and stores for later execution.
returns the index (id) of the query in the batch so it can be removed later (not implemented)

+ db::run_batch() - run all the queries in the batch queue in one swift stroke, returning the results of each
query in a separate array item.

+ db::gather_multi_results(...) - given a multi_query resource, gather all the results in an array. this is an
abstractd function used by db::all() and db::run_batch()

+ db::determine_query_server(...) - given a prepared, ready-to-execute query, determine whether or should be run
on a master or slave. TODO: test if replication is even on, and implement this method in db::_query()

tested, and working (WITH replication on). needs more battle testing before being decalred OMG ready, but nobody
uses replication anyway, we until then we're up shits creek.

TODO: implement multi_queries in base_model::_insert/last_id()

lyonbros/a-frame