mango: extend execution statistics with keys examined (#4569)

Add another field to the shard-level Mango execution statistics
to keep track of the count of keys that were examined for the
query.  Note that this requires to change the way how stats are
stored -- an approach similar to that of the view callback
arguments was chosen, which features a map.

This current version supports both the old and new formats.  The
coordinator may request getting the results in the new one by
adding `execution_stats_map` for the arguments of the view
callback.  Otherwise the old format is used (without the extra
field), which makes it possible to work with older coordinators.
Old workers will automatically ignore this argument and answer in
the old format.
5 files changed