waf: Add program checks for valgrind/gdb, add codeformat target.

Codeformat style is not perfect, custom styleset to be added.