Improve event handling and support to send user data

- move event handling from global variable to mbus handle
- add new function to send a user data packet from master to slave