Fix cpu core count detection to use hwloc library

Uses the HWLOC_OBJ_PU count which should return the logical cpu count;
fallbacks to old detection if hwloc didn't work out.
Fix autotools for changes in llvm-config (llvm 3.5)

llvm-config --ldflags no longer prints the libraries, and has
separate command for that: llvm-config --system-libs

Fixes issue 112