Handle errors in the TUIO input functions.

Replace the assertions with some error handling. I arbitrarily decided
to ignore unexpected commands for expected session IDs.