Fix Runtime/POSIX/Isatty.c test under LLVM3.3. The program makes
a call fprintf(stderr,...). llvm-gcc transforms this to a call to
fwrite() however clang does not so klee-uclibc's fprintf will be
called instead and if klee-uclibc is compiled with KLEE_SYM_PRINTF
then output will always go stdout if the FILE is stdout or stderr.

The end result of this is that when we build with Clang under LLVM3.3
is that the fprintf(stderr,...) print outs go to standard output instead
and so the test would fail because it expects the fprintf(stderr,...)
to be on stderr.

This test sort of fixes this by having the test check stdout for
the fprintf(stderr,...) statements too.
Merge pull request #101 from delcypher/fix_isatty_llvm33

Fix Runtime/POSIX/Isatty.c test under LLVM3.3.
Explicitly propagate CPLUS_INCLUDE_PATH and C_INCLUDE_PATH environment
variables in llvm-lit. This should hopefully fix the build bot.

The propagation of environmental variables was also slightly refactored.
Add support for archive and single bc file linking

With LLVM 3.3 the linker does not support reading of
archive files directly. This brings the support back
(based on llvm-mn).
Furthermore, linking single bc files or archives with
bc and object files mixed is supported as well.
Improved archive (of bitcode modules) linking performance for
LLVM >= 3.3 by effectively reimplementing the linking algorithm
used in LLVM <= 3.2.

The LLVM specific bitcode archive format has been removed
from LLVM >= 3.3 . Now archives are normal system archives that can
contain LLVM bitcode modules as well as regular binary object files.

The previous commit implemented an approach where ALL the bitcode
modules get linked in which can be terribly slow when klee-uclibc gets
linked (~600 LLVM modules).

Here are the options that I considered to address this:

* Use LD with LLVM gold plug-in and call as an external program.
  I Don't really want to add another dependency to KLEE. It already
  has enough!

* Use the upcomming LLVM linker (lld). Not really an option
  because at the time of writing there is no support for linking
  archives of bitcode modules.

* Don't use archives at all and just work with modules (i.e.
  replace uses of llvm-ar with llvm-link and tinker with the
  flags a little). This isn't so great because the resulting
  LLVM bitcode module we execute is bigger than it should be.

* Reimpelent bitcode archive linking ourselves in a slightly
  better way.

I've gone for the last option

This implementation unfortunately loads all bitcode modules into memory
first so we can query the module symbols tables. I would prefer to read
the archive's index and link in modules on demand but unfortunately
although the new Object::Archive interface in LLVM allows iteration over
symbols it doesn't provide a way of knowing if that symbol is
defined/undefined.

This implementation is far from perfect!
Do not consider llvm intrinsics as undefined symbols in KLEE's
bitcode archive linker.
Implement const_iterator interface for SpecialFunctionHandler so
that clients can access HandlerInfo nicely.
When using KLEE's built-in Bitcode archive linker do not consider
KLEE intrinsics as undefined symbols
Fix access of iterators after they have been invalidated

Iterators get invalidated after elements of std::vector/set are
deleted. Avoid this by remembering which elements need to be
deleted and do it after iterating over the data structure.