Get additional link flags from llvm-config.

This fixes link issues with curses-enabled LLVM builds.
Update Makefiles in app directory

Use llvm LDFLAGS and allow compilation with clang++
Merge remote-tracking branch 'origin/master' into llvm-ldflags
Keep explicit -lpthread -ldl

Don't assume that these are included in $(llvm-config --ldflags)
Update README
Merge pull request #234 from halide/llvm-ldflags

Fixes for compiling with recent LLVM/clang versions