Test mqtt variable length decoding and fix a bug in `parse_mqtt`

Fix valgrind makefile target and fix a couple of memory leaks in the tests