Encoding bugfix.

Use bytearrays in Packet.toBinary().  Encode strings as utf8.

Return the job in the default handleDisconnect method (as the
documentation says should be done).

Change-Id: I2d2410abff94bc9a7a20f3729c193b5ae8a610d1