Enabled sending media message while PollMessage is up by user

Hi,

First, thank you for your effort and your good work.
I am using this API to send notifications among my company workers about our system events.

When I worked with the API I noticed that when I run PollMessages from one thread and try to send an image from another my application crashes.
The reason for this is that both threads try to receive data from the same socket which causes the message get corrupted. One thread get the header and the other try to read the content as a header... :-(
It only happens with media messages because they use pollMessage.
To avoid this I added a variable that checks if someone is holding the pollMessage, and if so it skips the polling when trying to send a media message.
I also added a mechanism so you can send several media messages at the same time (not sure it works).

Regards,
Ami