allow lti tool to set a beforeunload message

refs CNVS-16272

test plan (in supported browsers):
 * post this message from an lti tool:
    parent.postMessage(JSON.stringify({
      subject: 'lti.setUnloadMessage',
      message: 'Interrupting navigation'
    }), '*')
 * attempt to navigate away from the page
 * a navigation confirmation dialog should be shown
 * post this message from an lti tool:
    parent.postMessage(JSON.stringify({
      subject: 'lti.removeUnloadMessage'
    }), '*')
 * attempt to navigate away from the page
 * the navigation should be successful without a confirmation

Change-Id: I9b41d18b79e7830145445137a75c01aeb61f748c
Reviewed-on: https://gerrit.instructure.com/43844
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>