Revert "Retrying SSL_accept and SSL_connect if error.", again.

This reverts commit 39375e1bb04f165d8fe996734fe17eaccc78ca81.

All our code uses *blocking* sockets. We shouldn't have to deal with
fragile polling loops and secondary time-outs with no real reason.

There *is* one case that we get the SSL_ERROR_WANT_READ error even
though our socket is blocking, but I'll comment and cover that one case
with a separate pull request.

Conflicts:
	cf-serverd/tls_server.c
	libcfnet/tls_client.c
Log nice error message in case of recv timeout within OpenSSL.
Assert that the openssl sockets are blocking.

If we ever need to use non-blocking sockets, that need should be
accomodated by creating different API for that. Our current functions
are surprisingly simple (a good thing!) because they don't work for
non-blocking sockets.
Log more appropriate message if interrupted by signal

In addition, reworded a couple of messages in order to not repeat the
"error" word.
Merge pull request #1740 from jimis/openssl_no_retry-redmine_5973

redmine 5973
When db is closed, make sure write transactions are closed

The catch here is that because we use thread-local storage in
dbm_lmdb.c, we can only close the write transaction of the current
thread. Nevertheless this should only happen when the process exits
(signal handler or program finished) so only one thread is supposed to
exist.
Merge pull request #1741 from jimis/lmdb_abort_txn_on_exit

When db is closed, make sure write transactions are closed
Special handling of signals for cf-key.

Handle SIGINT and SIGTERM to set gobal flag that makes the
ShowHost callback return false, thus causing ScanLastSeenQuality break
out of the while loop and return cleanly.

Fixes redmine #5957
Merge pull request #1742 from vohi/redmine/5957

Special handling of signals for cf-key.
Satisfy linker when building unit test.

This test is not testing anything right now, probably needs to
link in more code from libpromises once it does, but for now keep
it simple.