Extract some reusable stuff from Makefile

git-svn-id: http://address-sanitizer.googlecode.com/svn/trunk@1745 3c3640eb-14a6-2bb8-0b94-e9e73afe33f5
Add the first ASan-for-DLLs test. TODO: run it on the bot

git-svn-id: http://address-sanitizer.googlecode.com/svn/trunk@1746 3c3640eb-14a6-2bb8-0b94-e9e73afe33f5