Gcc 4.9 LTO fix

The new lto format requires use of the gcc-provided gcc-ar and
gcc-ranlib binaries.
Link to pthreads on non-apple unix
Fix to disable LTO for Clang

The previous code was assuming Apple == Clang.  This change should both
enable LTO when using gcc on Apple and fix Clang when using it on other
platforms.
needed to remove REQUIRED from find_package(Threads)
Fixed console handler not properly exiting on SIGINT and such
Added comments to wallet functions