Add event emission to pre/post operation

A handler can subscribe to pre/post operations.
Adding emit method to session to support this (event
emission still happens through the session).