javascript: Unify naming of error callback in IPConnection

Also don't store disconnectErrorCallback as it's not needed.
javascript: Remove unused code
javascript: Fix offset handling for unpacking types larger than one byte

Also fix typos in two function names.
javascript: Rename sequenceNumber to nextSequenceNumber to match common naming style
perl: Make test script use "use strict; use warnings;"