Ported pico_ql_search_h.erb for Valgrind in master.
Introduced Ruby flag for Valgrind and moved conditionally executed code for Valgrind
to Ruby templates (e.g. tokenize_constaint_set()) using the Ruby flag.
In general, used meta-programming instead of C preprocessor flags at most cases
to aid readability.