Add the ability to control whether the pretty printer uses line breaks

This change makes it possible to more reliably write unit tests which check
that an expression is equivalent to an expected pretty printed string.
Merge pull request #108 from pcc/pp

Add the ability to control whether the pretty printer uses line breaks
Use SmallString and llvm::sys::path/fs API of LLVM 3.4 because
Old Path API was removed
Update to new lit configuration to support changes in LLVM3.4
Fix test case to support new llvm-lit
Add missing include file for LLVM 3.4
Tidy up code by using LLVM's V2 path API only and removing uses
of old V1 path API.

LLVM2.9 supports LLVM's V2 path API. Because that is the minimum
version we support we should just use this API everywhere so we
reduce the number of #if LLVM_VERSION_CODE macros and duplicated
code.
Do not add SimplifyLibCallsPass for LLVM 3.4 and newer because
it has been removed. From the LLVM 3.4 release notes:

"
The library call simplification pass has been removed. Its functionality
has been integrated into the instruction combiner and function attribute
marking passes.
"
Replace sys::Process::GetCurrentUserId() with getuid() because it
has been removed in LLVM3.4
Fix mistake in StatsTracker. It should be reporting process ID but
instead it was reporting real user ID of the process.
fix TOCTOU and simplify output directory creation
Fix compilation under LLVM2.9. SmallString in this old version does
not have the equals() method.
Fix handling of path name creation.

If directory has no trailing slash, the slash is not addedd
if concatenated