syslog: refine the decoder

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