Add additional flexibility to handling ssh keys

The ssh key used by clients and the client identify can now be supplied
as environment variables.

ssh keys with pass phrases are also now supported, the pass phrase
can be supplied by an environment variable or through the config file.
Caching code for reading the ssh_known_hosts file.

When you have thousands of machines, re-parsing the ssh_known_hosts file
once per reply becomes extremely expensive (to the point where you
spend several seconds on the CPU, just doing that work). This results
in discovery failing to find a bunch of hosts, as the discovery timeout
is for replies to both be recieved and validated, and the validation
can take longer than the timeout.

By instead only reading the file once, we avoid that, meaning that we
can sensibly discover hundreds or thousands of hosts within the
discovery timeout.

This works nicely, however it won't work so well for registration as in
that case the known_hosts file IS opened by the server, and so will be
cached forever, which isn't desireable..
Fix ssh_known_hosts file cache invalidation

We store the mtime of the file that we cached, so that if it's
subsequently changed then we re-read the cache.
Merge branch 'cache_known_hosts'
Merge branch 'env_variables_for_client_config'