Use ld to replace malloc/calloc for testing

The original code uses dlsym with RTLD_NEXT to replace malloc/calloc for
testing. However, this implementation causes the following error when using
address sanitizer [1] in clang 3.2.

=================================================================
==2775== ERROR: AddressSanitizer: attempting free on address which was not
malloc()-ed: 0x000002b43040
    #0 0x4b95e0
(/home/czchen/src/chewing/build-libchewing/test/test-memory-fail+0x4b95e0)
    #1 0x40dda9
(/home/czchen/src/chewing/build-libchewing/test/test-memory-fail+0x40dda9)
...

In order to prevent this error, we use --wrap option in ld to replace
malloc/calloc instead.

[1] https://code.google.com/p/address-sanitizer/