build: Auto-detect whether -DBOOST_TEST_DYN_LINK is needed

Use AC_LINK_IFELSE to auto-detect whether boost test is linked
dynamically, instead of assuming based on target.
build: Allow providing extra libs for Boost Chrono

Pass BOOST_CHRONO_EXTRALIBS to give extra dependency
libraries for Boost Chrono which are not auto-detected.
build: Pass BOOST_CPPFLAGS to sleep implementation test

Makes sure that `-pthread` and other flags required for boost
compilation are passed.
gitian: Reduce build time for boost windows dependency

Build only the mt-s (multithreaded, static runtime link)
variant of the library.

This cuts the build time in half.

Also prevent unpacked boost from ending up in output directory,
checking and hashing all the source files as output files this
takes a lot of time and is pointless.
gitian: Build boost dependency for linux

Instead of using the boost provided by Ubuntu 12.04, build our own
dependency like we do for Windows.

This allows using a much newer version (1.55 versus 1.46) as well as
building with `-fPIC` so that `-pie` can be used in the x86-64 build.
gitian: Add openssl to linux deps

Build OpenSSL instead of using distribution-provided
library.
Merge pull request #3545

1cbbeb6 gitian: Add openssl to linux deps (Wladimir J. van der Laan)
64be7f7 gitian: Build boost dependency for linux (Wladimir J. van der Laan)
7eb99a8 gitian: Reduce build time for boost windows dependency (Wladimir J. van der Laan)
714cdec build: Pass BOOST_CPPFLAGS to sleep implementation test (Wladimir J. van der Laan)
0d40f5a build: Allow providing extra libs for Boost Chrono (Wladimir J. van der Laan)
e4b991e build: Auto-detect whether -DBOOST_TEST_DYN_LINK is needed (Wladimir J. van der Laan)