cmd: Update the memory-search command

Add various fixes and improvements to this command that were missed in
the original version. Unfortunately I forgot to send v2.

- Fix Kconfig name
- Use a separate variable for the remaining search length
- Correct a minor bug
- Move into a separate test suite
- Add -q flag to the 'quiet' test to test operation when console is enabled
- Enable the feature for sandbox

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/cmd/Makefile b/test/cmd/Makefile
index 85d38f0..859dcda 100644
--- a/test/cmd/Makefile
+++ b/test/cmd/Makefile
@@ -2,4 +2,5 @@
 #
 # Copyright (c) 2013 Google, Inc
 
-obj-$(CONFIG_MEM_SEARCH) += mem_search.o
+obj-y += mem.o
+obj-$(CONFIG_CMD_MEM_SEARCH) += mem_search.o