ndo2db: Reduce memory moves when handling NDO input.

The previous queue interface required extra copies of the data to be
enqueued. By reading client input directly to a queue message
structure, we can msgsnd() without any additional copies.

Start renaming queue functions with ndo2db_ prefix.

Handle edge cases where a failure on the last retry could be reported
as success or exceeding the maximum number of retries.

Additionally, read up to NDO_MAX_MSG_SIZE-1 bytes at a time from the
client to reduce the syscalls that need to be made for larger messages.
Previously this was 511 bytes.