Refactor mqexec

Mqexec has turned into a much larger application than when I first
wrote it. This commit breaks it up into a bunch of C files and adds
a header file, instead of having a 1200-line mqexec.c