discussions: warn when leaving page unsaved

fixes CNVS-10939

test plan:
  * create or edit a discussion or announcement
  * edit the topic body
  * navigate away from the page
  * verify that a warning is presented
  * revert your changes
  * navigate away from the page
  * verify that no warning is presented

Change-Id: I3e66b4b84a652cb7478f0fa120e6ab335ff3436c
Reviewed-on: https://gerrit.instructure.com/31703
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>