Set this.promiser immediately after promiser expansion per iteration.

HACK: except for files and storage promises.
Unstage acceptance test.
Close #5959.
Redmine#5981: add dcs.cf.sub and plucked.cf.sub to distributed files
Redmine#5981: clarify --gainroot=env
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.
Partial revert of 0a97e68c48 (Special handling of signals for cf-key)

In that commit, the signal handler for SIGPIPE was removed. SIGPIPE
can easily happen when you pipe your input into for example grep, so
we need to restore this. We ignore the signals so any output after the
signal will just go to the void.
examples/container_key_iteration.cf: add a container key iteration example
Be silent by default if peer sends few bytes. Redmine #5919.

So that cf-serverd does not complain when portscanned,
e.g. selectservers() policy function.
Merge pull request #1743 from jimis/master

Be silent by default if peer sends few bytes. Redmine #5919.
Lower the time spent scanning lastseen DB.

The total DB access time will thus not depend on the time spent running the callback (it seems to be huge in the case of reverse DNS resolution).

This commit makes it easier to later convert the scan into an RDONLY operation.
Merge pull request #1744 from jeffali/fix/scankeys

Lower the time spent scanning lastseen DB.
cf-key -s has its special sig handler but the other operations need one too