Add support for certificate chains.

Add options (--ssl-chain-cert and --no-ssl-chain-cert) to control whether the argument to --ssl-cert is treated as a single certificate or a chain of certificates down to the root CA certificate.  Chained certificates are required by some browsers, including Firefox, in order to recognize some certificates.
Bump network and text
Bump network and text
Merge pull request #52 from ryantrinkle/0.9-stable

Add support for certificate chains.
Merge branch '0.9-stable'

Conflicts:
	snap-server.cabal
	src/Snap/Http/Server.hs
	src/Snap/Internal/Http/Server.hs
	src/Snap/Internal/Http/Server/Config.hs
	src/Snap/Internal/Http/Server/TLS.hs
Fix bad merge (recent cert chaining changeset).
Some perf improvements for pGetTransferChunk, test improvements.
Testsuite: wait for testsuite to end before we finish (hopefully this will fix the "forkOS_entry: interrupted" errors.)
Eat exceptions around testsuite main.
Some minor exception/bracket cleanup fixes.
Don't exit the server upon receipt of unknown exceptions. Closes #60.
Rework how we use threads in the main http loop.

This is an attempt to fix
https://github.com/snapframework/snap-server/issues/61 (forkOS_entry:
interrupted on exit). Simon M reports that this happens if you try to
forkOS (or runInBoundThread) when the main thread has started its exit.
He suggested to make sure that all child threads (especially ones
calling into HsOpenSSL code) are dead before the main thread exits.

To that end:

  - introduce a new abstraction `SnapThread` that you can `wait` on

  - use the much higher-precision system monotonic clock (via the
    "clock" package) in TimeoutManager rather than epochTime

  - rewrite timeout manager. Frequency of thread reaping is now
    controllable, and timeout manager keeps track of threads until they
    finish.

  - various exception/bracket/masking fixes (I'm sure there are more
    issues remaining).
Fix build.
Fix build for older ghc (tryReadMVar not available there).
Tweak the last CPP fix.
Updates in line with recent Snap-Core changes

Changes Snap.Internal.Types to Snap.Internal.Core

Related to: https://github.com/snapframework/snap-core/commit/02c087b91b1aafdc865b9f19d12a9ed770667bcb
Merge pull request #64 from ChristopherBiscardi/snap-core-internal

Updates in line with recent Snap-Core changes