Handle weakref the clang way.

Instead of introducing an alias to undefined, simply replace the uses of the
weak reference. This makes dragonegg's output match clang in these tests
and fixes the bootstrap.

dragonegg will still produce an unnecessary test2_g symbol in

void test2_f(void) {}
static void test2_g(void) __attribute__((weakref("test2_f")));
void test2_h(void) {
  test2_g();
}