Make sure message_stats and queue_totals are serialized as JSON objects
Refactor

 * Wrap all values in {struct, OldVal}
 * Use a list comprehension
Inline wrap_values_in_struct() and do the same for non-monitoring users.
Merge bug25889
stable to default