refactor xapi to a service class

also made it use a token in the url instead of only
working for assignment launches

Testplan:
 * Install the test lti app http://lti-tool-provider.herokuapp.com/
 * launch it as a student and click the xapi link in the app
 * the page view count for that student should increment in the
   analytics UI
	 (note, that UI is heavily cached, you may need to clear redis
	  to see the latest number)

Change-Id: I4fd1ff8201a2a11c654d789bfcd61e7cf44f3c7f
Reviewed-on: https://gerrit.instructure.com/42818
Reviewed-by: Braden Anderson <braden@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
QA-Review: Braden Anderson <braden@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>