When building ubsan, link in ubsan parts first and sanitizer-common second, to
pick up the common bits ubsan actually needs. Also remove whole-archive when we
aren't trying to re-export the symbols.