syslog: refine the decoder

Switch to TCHECK2() and improve format checks further. Remove some
excess code, an unused #include, some trailing whitespace and a few
empty lines.