Flush all entries on channel shutdown

This just makes sure we flush out outstanding queue quickly.

Change-Id: Ib1f7262545f012fe8c418cbe980cc63467a4f654
Signed-off-by: Robert Varga <rovarga@cisco.com>
Optimize macAddressToString and padBuffer

Optimizes macAddressToString to prevent multiple object allocations and
do a straightforward coversion -- speedup of ~6x.

padBuffer() is deprecated in favor of writeZero(), and uses it
internally.

Change-Id: I98264fe1744b66363b8b3fcae4d54b4b78814cc8
Signed-off-by: Robert Varga <rovarga@cisco.com>