add dir lib, which contain file libtcmalloc_minimal.so.
modify mysqld_safe to use lib/libtcmalloc_minimal.so.
modify CMakeLists to enable making package copy libtcmalloc_minimal.so