Pass a maximum buffer size parameter to command_encode_and_frame() and
support encoding messages even if there may not be enough space for
the largest possible message. In practice, most messages will encode
to a size notably smaller than their maximum so this improves buffer
utilization during heavy message traffic.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>