Handle invalid NULL at the end of a PDU

We've seen at least one provider that sends a NULL byte after the `short_message` field in a `deliver_sm` PDU.

This is a violation of the SMPP spec, but we should probably handle it more gracefully than assuming it's the start of an optional parameter and exploding because it's too short to be a 16-bit integer.
I saw that, thanks. Unfortunately, the logging situation is a little more complicate than it appears at first glance -- we're using Twisted's logging in the code that calls this, and the interactions with Python's logging require some careful thought.

Also, this project is something that we generally prefer not to touch unless it's absolutely necessary. It currently (mostly) works for us in production and the effort and risk required to clean it up properly are fairly high for the value we'd get from doing it.

Those are embarrassingly bad reasons for basically ignoring your contributions, for which I apologise, but it's the situation we're currently in. :-/

I do plan to look at the logging stuff again when I get some time. Hopefully in the next few weeks.