Split the code into two binary programs: check_memory and check_swap

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>