added memory checker to tools
added SortMetrics

- also improved MemoryChecker
MemoryChecker now returns the memory in kilobyte
Added metric and test framework