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 remote branch 'origin/request-api-rework2' into request-api-rework2

Conflicts:
	src/test/request/treq.c