Support emitting analytical events from xblocks running in the LMS

XBlocks can and should use the "publish" method provided by the runtime to emit analytical events. In theory we could now start replacing calls to track_function with calls to publish, however, that migration is not handled by this change.

Fixes: AN-789
Merge pull request #3089 from mulby/gabe/publish

Support emitting analytical events from xblocks running in the LMS
this will allow for clientside javascript reporting
Merge pull request #3109 from edx/jarv/upgrade-newrelic-agent

this will allow for clientside javascript reporting
Updating edx-ora2 branch