Do not call SetPolicyServer(NULL), this is a programming error!
GetIdleConnectionToServer: Do not log ipaddr if it didn't resolve.
Verbose message was deceptive.
Fix redmine #2810

During bootstrapping the keys are created during the first promise pass, so
they need to be read from the files when the agent tries to connect to the
server in the second pass, else bootstrapping fails.
Don't try to connect without keys when bootstrapping

so that connection is tried on second or third promise pass of failsafe.
Don't give instructions for previous releases, we know we are running a current release.
Don't complain about bootstrapping failure if keys are not there

... since the keys will be generated from the "commands" promise.
Output error about missing key *before* generating it.
Add missing call to Enterprise code.

This was apparently missed when making the Enterprise plugin.
Make GAINROOT variable overridable by an environment variable.
Add support for "unsafe" tests.

They are meant to contain tests that modify the real system and can be
potentially harmful. They can be turned on by using the --unsafe
option or using the UNSAFE_TESTS environment variable.
Add documentation of "--unsafe" option to testall.
Updated documentation with regards to test naming.
Merge pull request #952 from kacfengine/master

Revert lmdb2 branch due to copyright issues.
Replacing IP parsing with IPAddress

IPAddress implements correct ip parsing according to the relevant RFCs.
I replaced the current parsers which were prone to error with it.
Fixing a warning about no return from function
Renaming files to follow the convention
Moving documentation to the header file.
Removing an unneeded else statement

This removes a warning saying that the function returns nothing.
IO related unit tests for TLS

The tests included in this commit relate to tls_generic.{c,h} and cover
the IO parts of the TLS protocol.
I rewrote the TLSRecvLines function to make sure we get the first line,
and there are no possibilities of exploiting our parser.