Optimise fabric:all_dbs()

Previous version was awefully inefficient: we only need the dbname, but we
opened each document body, parsed the shards out of it, generated Q*N shards,
then put them in a list and usorted them back down to a list of dbnames.

We don't use this in many places (mem3 security sync, fabric bench) but it
might be nice to have an efficient version of it anyway.
5 files changed