log.h: add missing include of stdarg.h
config: rework flux_conf_* API

Create a flux_conf_t class which hides the czmq::zconfig API behind
a much simpler one.  Users of the class will see a flat list of
keys, albeit keys with path separators that allow them to be mapped
into the hierarchical key space of the KVS or zconfig interchangeably.

Since not all users of the flux_conf_t class will want to link
with libkvs.la and its dependencies, the class provides suitable
interfaces for external code to load/store the cached config in the KVS.
(This will be later added to libkvs.la)

The API provides
 - create/destroy
 - set_directory/get_directory to get/set the config directory
   (a default of $HOME/.flux is used if set is not called)
 - load/save/clear to manipulate an internal cache relative to config file
 - get/put values in the internal cache
 - iterator to generate and walk an ordered list of keys

Unit tests are a part of this commit.
config: add API for config load/save from KVS

This implements functions to load/save config from KVS:

kvs_conf_load  - load flux_conf_t cache from KVS config.*
kvs_conf_save  - save flux_conf_t cache to KVS config.*
security: don't hardwire $HOME/.flux

Replace the hardwired $HOME/.flux key directory with an API
call for this to be set externally.  Adds two new security
API functions:

  flux_sec_set_directory  - set the config directory (required now)
  flux_sec_get_directory  - get the config directory

The set function must be mad immediately after flux_sec_create().

Fixes issue #40 (with following commits to flux-keygen and cmbd)
build: drop support for security.c with old ZeroMQ

Conditionally building without CURVE support isn't necessary anymore
now that CURVE is in stable ZeroMQ releases, and anyway isn't supported
by the rest of the project.
build: flux-snoop drop ifdefs for old ZeroMQ API
config: update flux-snoop for security API change

Flux-snoop connects an ipc:// endpoint to the broker to receive
published "snoop" messages and requires security to do that.

Call flux_sec_set_directory (), taking the config directory from
FLUX_CONF_DIRECTORY, set by flux.c
config: update flux command for API changes

Use the flux_conf_t class instead of manipulating zconfig directly.

Have the flux --config option set the config directory rather than the
file.  Then unconditionally set FLUX_CONF_DIRECTORY so other commands
know where the config directory is.  FLUX_CONFIG is no longer used or
set.  The config file will always be named 'config' in the config
directory.

If FLUX_TMPDIR is set, load the config from the KVS.  Add an option
--file-config to force the use of a file instead.  Pass this to
sub-commands by setting FLUX_CONF_USEFILE=1 in environment.

Ensure that these variables are either set or cleared by flux.c
so that setting these before running flux has no effect.
config: update flux-config for API changes

Use flux_conf_t instead of using zconfig_t directly.

Load config from the KVS if FLUX_TMPDIR is set.
Respect FLUX_CONF_DIRECTORY and FLUX_CONF_USEFILE settings.

Drop the argument to the dump command (always dump everything).

Add a 'save' command to copy config from KVS to a file, e.g.
from within a comms session

  flux config save [configdir]
config: update flux-keygen for API changes

Require that FLUX_CONF_DIRECTORY be set.
Use it to make a call to flux_sec_set_directory ().
config: update broker for API changes

Load config from parent KVS or from a file depending on
FLUX_TMPDIR, FLUX_CONF_DIRECTORY, and FLUX_CONF_USEFILE settings.
Set kvs: module options which will cause the config values to be
mirrored in the KVS config.* space.
config: move in-tree config to etc/flux/config

Instead of generating $(top_builddir)/flux.conf, create a directory
$(top_builddir)/etc/flux and generate 'config' in there.
Keys for in-tree tests will be co-located with this config.
config: update t0001.t for flux-config changes
config: update man pages, flux.c usage message
config: return EINVAL on put/get keys with embedded slashes
config: update t0001 to avoid use of / in keys
config: flux should work without a config file
config: flux-config should work without a config file
config: cmbd should work without a config file
config: generate in-tree keys as last build step