Fixes and alterations to allow Chapel to use tcmalloc correctly.

[reviewed by gbtitus]

configure.ac and Makefile.am: Weaken symbols and add the --enable/disable-libc-malloc-override flag

src/static_vars.cc: Because we disable the libc override, initialization of 
  static variables changed, and we need to force it earlier.

  Here we also disable the sampler, as on some systems there's an
  order-of-initialization issue with libm. We can do this because with 
  --enable-minimal on the sampler is unused.

src/thread_cache.cc: Disable another sampler init call.

src/lib_override.h: ifdef out the overrides for all but OSX. Tcmalloc defines
  some functions that OSX doesn't provide.

See r18976, r19429, r19432, and r19488 for additional comments on changes
  made to both the 1.7 and 2.2 versions of tcmalloc for Chapel.


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@23592 3a8e244f-b0f2-452b-bcba-4c88e055c3ca