Prior to this change, the publish API returns 200 in most of
the cases.
This change provides more insights to the publish result.
For single message publish endpoint (`publish/`):
HTTP error codes are:
200: Everything is OK
202: No subscriber for the topic
400: When mesage is invalid message.
e.g. bad topic name or QoS out of range.
503: Failed to dispatch the message. e.g. during EMQX restart.
The response body is a JSON object with two fields
`message_id`, and `publish_result`.
The `message_id` is a globally unique ID for tracing.
`publish_result` is `"OK"` when the message is delivered
to at least one subscriber.
Otherwise `"no_subscriber"`.
`publish_result` may also be some other informative
message to hint the failure result, the content of which
may change in the future.
For `publish/bulk` endpoint:
200: When all message in the bulk are published OK
202: If at least one message in the bulk had `"no_subscriber"` result
400: When mesage is invalid message. e.g. bad topic name or
QoS out of range.
503: When there is at least one message failed at dispatch.
The reply body is a list of JSON objects having the same layout
as for hte `publish` endpoint.