Cleanup query option parsing for memory values.

Change-Id: I95ef6487718ce1696db3b9d1fefe4ac7cfa26dc0
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4159
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins