experimental extension point for intercepting events

intended for non-intrusive extensions of  leshan, comments welcome
possibly a race condition in this singleton implementation?