Extract common functionality to xblock-utils

I would just like to keep the name of publish_event as seen from js.
What do you think about `publish_event_from_dict`?