Make handling on and off message handling less nameclashy.

The problem here is that there's "on_X" for various messages, but traps treat potentially any script message as an on or off message, hence on_turnon and on_turnoff are
difficult names, as they may not in fact be called in responsed to TurnOn or TurnOff messages at all.

onmsg and offmsg are somewhat bandy as names, but they at least avoid the direct mapping to existing script message names.
Mark as alpha.
Updating to match changes to TWBaseTrap interface.
Updating to match changes to TWBaseTrap interface.
Helps if you call the right function to parse values, so I hear.
Tweaks to ensure counter is only updated when needed.