discussions: use strings for IDs in ENV and materialized view

fixes CNVS-10341

test plan:
  * before applying this commit, if possible:
    * create a discussion
    * add a reply as a student
  * after applying this commit:
    * open the discussion as the student
    * verify that you can edit the reply you added before, but not
        those from other users
    * add a new reply
    * without refreshing, verify that you can edit your new reply
    * refresh the page
    * verify that you can still edit your reply

  * test basic canvas functionality (sorry)

Change-Id: Ifa654f7d853fd167d5bfbaee6184657209d58272
Reviewed-on: https://gerrit.instructure.com/28413
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>