redmine4094: Infer start-time from elapsed when needed.

Some variants of ps report start-time as a date if before today (no
matter how recently today started) or even report a year for dates
before this year (even if new year's day started mere seconds ago).
These, naturally, give very imprecise information.  When that happens
but we have an elapsed time column (containing a value we can parse),
use this to infer a better start-time.  At the same time, improve
parsing of relevant time strings generally.  Based on a patch from
Tony Lill - many thanks.
Handle old host-regex properly as sub-domain in new ACL.

This resolves
     TODO clean up possible regex, if it starts with ".*"
     then store two entries: entry, and *dot*entry.
from an old comment.  I'd inadvertently implemented this direction of
mapping by mistake when I set out to do the - much easier (see
previous commit) - reverse transform and got confused.  So, might as
well not waste it.

Note that a regex that doesn't make sense as either a sub-domain match
or a simple domain name shall now be ignored, where it was previously
added to the host-name ACL; but, since it wouldn't have matched
anything anyway in the new-style ACL, there should be no harm in
omitting it.

(cherry picked from commit 08dce3a22d1e5c97adb5f664beb552d2b58886b0)
Merge pull request #1934 from ediosyncratic/stime-fix-36x

[3.6.x] redmine4094: Infer start-time from elapsed when needed.
Clean-up and documentation in processes_select.c

Corrected a Log() message that thought it only related to elapsed
time; it could also relate to other times.  Use isspace() rather
than only comparison to ' ' in case there are tabs.

Made some variables more local, made some comments clearer, added some
comments.  Petty consistency in typography of isspace() calls.

(cherry picked from commit f26442a0129be6514586f641c73ba0da1096fbd1)
Reload HA configuration when policy is changed.

After policy is changed make sure that HA configuration is reloaded.
This is needed by the cf-serverd as we don't want to restart it all
the time HA configuration is changed.

(cherry picked from commit 417d98209f0f74233638dac419e2bca3cdca4c47)
Get rid of spaces between arguments on test help screen.

It makes it easier to read, since the number of options is getting
quite big.

(cherry picked from commit 480f68d2f4772e7a802851f772da66b6ca368831)
Casting necessary for the case size_t is smaller than int.

(cherry picked from commit 9effa9c17c4795e4e593b091913f993efe1f2119)
Casting is not needed, but is good practice

Always cast negative values in unsigned types since in some cases bugs
might be hidden. See:

https://www.securecoding.cert.org/confluence/display/seccode/INT18-C.+Evaluate+integer+expressions+in+a+larger+size+before+comparing+or+assigning+to+that+size#INT18-C.Evaluateintegerexpressionsinalargersizebeforecomparingorassigningtothatsize-NoncompliantCodeExample%28size_t%29
(cherry picked from commit 6c03d55a60af061e3238608e0f902b79c9c9b6b0)
Turn on reverse DNS lookups when there are admit_hostname rules.

(cherry picked from commit 16035ec51913f082dd997f9c81055f370173d72c)
Rename variable masking identically named variable of different type.

(cherry picked from commit bf9b17e9afe9a18d82deb72cf6d157f2d8af8b7e)
Clarification comment.

(cherry picked from commit 24080a967ffcdd0d860762d949f2f35ccd5a5f89)
Acceptance tests for admit_hostnames and deny_hostnames.

(cherry picked from commit 10765ffa01ca06c1211f050913650dbd4deb4f4f)
Audit getaddrinfo() uses for proper freeing, redmine #6539.

(cherry picked from commit 09fb03bf23479f6499588a13185769777a7d4c33)

Conflicts:
	libcfnet/communication.c
Merge pull request #1938 from jimis/3.6.x

Audit getaddrinfo() uses for proper freeing, redmine #6539.