Add option to dump mem usage of all queries to /memz.

Change-Id: I586aa81be4cb8320ffa28c242d0fb1ea077fcb9e
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3042
Tested-by: jenkins
Reviewed-by: Nong Li <nong@cloudera.com>