Add functions to query the amount of memory used by a memory node

3 jobs for !39 with stats/query_used_memory in 41 minutes and 39 seconds (queued for 11 seconds)
latest merge request