leaks: replace check_memory.c with a rewrite check_leaks.c
The check_memory.c thing was sort of a mess. I removed previously wrote
a check_free.c which replaced part of check_memory.c but the remaining code
still had a bunch of unneeded states.
The rewrite is cleaner.
The complicated bit of doing check memory is handling structs and arrays.
In the rewritten version, I ended up not even trying to handle these. The
good news is the rewrite finds more bugs then the original check.
Signed-off-by: Dan Carpenter <error27@gmail.com>