Set re.IGNORECASE correctly for the build_type regex (bug 1062228)

Only the re module function .search() accepts the flags argument - for the regexobject search() method it actually gets interpreted as the 'pos' parameter, since |re.IGNORECASE == 2|.

With this change we now correctly identify tests run on ASAN builds as buildtype 'asan'.
Updates the test that was testing we were wrong, doh.