libflux: document raw handle request/response API
libflux: streamline flux_msg_set_payload() case

Short circuit the case where there is no payload in the message
and payload args are null/zero.
test: add couple more payload tests in message.c
libflux: add new request functions

Add new functions:
flux_json_request ()
flux_json_rpc ()
flux_json_respond ()

with the following improvements over previous version:
1) instead of integer rank, use uint32_t nodeid per RFC 3.
2) rpc returns int (-1, 0) rather than JSON response so errno doesn't
have to be tested to detect error
3) topic strings should not be printf fmt style
4) use names that allow non-json analogs to be added
libflux: reimplment legacy response funcs

Tidy up msg_set_payload_json().

Remimplement flux_respond(), flux_respond_errnum() in terms of
flux_json_respond().
libflux: reimplement legacy request funcs

Change flux_json_rpc() so that a missing payload isn't EPROTO
(we just set 'out' to NULL), for compat with legacy functions.

Reimplement flux_rank_rpc(), flux_rpc()
in terms of flux_json_rpc().

Reimplement flux_rank_request_send(), flux_request_send()
in terms of flux_json_request().
test: add request test

Includes module and client in src/test/request.
Just a simple test added for now.

Coincidentally, this test exercises module load unload so it
fixes #105
libflux: verify 'buf' in flux_msg_set_payload()

If 'buf' parameter is within the memory allocated to the message's
existing payload, if any, it will be freed during zframe_reset().
Detect this and return EINVAL, thus avoiding a potential use-after-free.

Add unit test for this.
libflux: change request API slightly

Split flux_json_respond() into
  flux_json_resond() - return errnum = 0, and json payload
  flux_err_respond() - return errnum (can be zero) and no payload

Add two decode functions:
  flux_json_request_decode() - decode a request with json payload
  flux_json_response_decode() - decode a response with json payload
Merge pull request #119 from garlick/request-api-rework2

request API rework