The rdpContext gets an event which will
get set if an error occoured in a channel.
If a thread or a void callback has to report an
error it will get signaled by this system.
This patch adds some checks for the TSMF channel:
* checks malloc / calloc / strdup / _strdup return value
* checks for available bytew before reading in a stream