Add a test of pure xblock and xmodule event publishing
Fix PureSystem so that runtime.publish() works for a pure XBlock.

Fix extracted from https://github.com/edx/edx-platform/pull/6035.