Better 'unknown command' error log
Automatically detect and change endianness when needed.

The byte order should be preserved with the hton and ntoh functions,
but to not break the current protocol, as a workaround a detection
was implemented here in the plugin.

Thanks to saibotznuk for reporting and testing.
Stop all filters when we are disconnected