Add -fsanitize= support to makefile.
Pass san=foo to make to build with -fsanitize=foo.
Minor makefile refactoring.