eventloop for ploting devices

solve #29 

in c, and funciton `EmbeddedR_ProcessEvents` is added to handle the eventloop.

In julia, the eventloop is triggered every 0.05s.