Fix bugs introduced by a code cleanup pass prior to the first GitHub submit.

1. Infinite loop when reading/writing arrays.
2. Incorrect event types in listen() and mdnsAdvertise().
3. Incorrect packet type and failure to write data array in send().

For 3., converted data send functions to the same mechanism as command send functions.

Disabled all debug levels by default, and wrapped some errant prints in debug level macros.