fix for "unknown author" when a post is required to see replies
fix for "unknown author" when a post is required to see replies

"Unknown Author" typically shows up when you fetch a discussion
before the background jobs have processed it. In this case, we
were fetching the discussion immediately after adding the
student's reply, so the background jobs didn't have a chance to
get to the new reply yet.

Normally this isn't a problem because the reply is added to the
discussion without refetching the discussion. In this case, we
need to remember the new reply, which has all the good
information in it, so we can replace bad fetched reply with the
good data.

fixes #CNVS-2406

test plan:
 - As a teacher, create a discussion topic with "Users must
   post before seeing replies" checked
 - As a teacher, create reply to the discussion
 - View the discussion as a student (shouldn't see replies)
 - Reply to the discussion as a student
 - Replies should load and you should see student's reply with
   the student's name

Change-Id: Id1189eabc0e8e1ff90c3764f2d0d92b425b50672
Reviewed-on: https://gerrit.instructure.com/16413
Tested-by: Jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@instructure.com>
Reviewed-by: Zach Pendleton <514dbb4d54d4f29e454990df7d075678f43f92aa@instructure.com>
QA-Review: Marc LeGendre <d33c80bc45d65303e33ca83108a9952b745af9ef@instructure.com>

kyroskoh/canvas-lms,skmezanul/canvas-lms,Unow/ins,Rvor/canvas-lms,landonwilkins/canvas-lms,AndranikMarkosyan/lms,snehakachroo1/LSI_replica,AndranikMarkosyan/lms,redconfetti/canvas-lms,tgroshon/canvas-lms,utkarshx/canvas-lms,HotChalk/canvas-lms,snehakachroo1/LSI_replica,tgroshon/canvas-lms,arrivu/qibla-ecampus,djbender/canvas-lms,fronteerio/canvas-lms,Unow/ins,arrivu/jigsaw-lms,ShreniiNepal/shrenii_lmp,arrivu/hiring-site,jay3126/canvas-lms,sfu/canvas-lms,usmschuck/canvas,nditech/red-innovadores-lms,nditech/red-innovadores-lms,wimemx/Canvas,arrivu/qibla-ecampus,samuels410/greatlakes-lms,loganrun/pincan,shidao-fm/canvas-lms,greyhwndz/canvas-lms,loganrun/pincan,roxolan/canvas-lms,Rvor/canvas-lms,efrj/canvas-lms,snehakachroo1/LSI_replica,djbender/canvas-lms,merichar/canvas-lms,roxolan/canvas-lms,wrdsb/canvas-lms,djbender/canvas-lms,va7map/canvas-lms,arrivu/hoodemo,samuels410/greatlakes-lms,eCNAP/CANVAS,venturehive/canvas-lms,instructure/canvas-lms,kyroskoh/canvas-lms,skmezanul/canvas-lms,greyhwndz/canvas-lms,sli7246/canvas_branch,utkarshx/canvas-lms,arrivu/arrivu-lms,antoniuslin/canvas-lms,samuels410/greatlakes-lms,sdeleon28/canvas-lms,matematikk-mooc/canvas-lms,narigone/canvas,tgroshon/canvas-lms,nditech/red-innovadores-lms,antoniuslin/canvas-lms,juoni/canvas-lms,narigone/canvas,gbleydon/canvas-lms,rup/Tarrax,ShreniiNepal/shrenii_lmp,ShreniiNepal/shrenii_lmp,efrj/canvas-lms,sfu/canvas-lms,dgynn/canvas-lms,jay3126/canvas-lms,wye0220/shindig-canvas,SwinburneOnline/canvas-lms,Unow/canvas-lms,efrj/canvas-lms,grahamb/canvas-lms,wrdsb/canvas-lms,fronteerio/canvas-lms,skmezanul/canvas-lms,djbender/canvas-lms,tgroshon/canvas-lms,landonwilkins/canvas-lms,matematikk-mooc/canvas-lms,ShreniiNepal/shrenii_lmp,juoni/canvas-lms,SwinburneOnline/canvas-lms,utkarshx/canvas-lms,eCNAP/CANVAS,wye0220/shindig-canvas,Rvor/canvas-lms,sfu/canvas-lms,matematikk-mooc/canvas-lms,usmschuck/canvas,wimemx/Canvas,grahamb/canvas-lms,va7map/canvas-lms,SwinburneOnline/canvas-lms,leftplusrightllc/canvas-lms,redconfetti/canvas-lms,greyhwndz/canvas-lms,dgynn/canvas-lms,grahamb/canvas-lms,Unow/ins,kyroskoh/canvas-lms,arrivu/hiring-site,juoni/canvas-lms,arrivu/hoodemo,merichar/canvas-lms,usmschuck/canvas,grahamb/canvas-lms,shidao-fm/canvas-lms,parbros/red-innovadores-lms,HotChalk/canvas-lms,rup/Tarrax,landonwilkins/canvas-lms,narigone/canvas,samuels410/greatlakes-lms,instructure/canvas-lms,shidao-fm/canvas-lms,instructure/canvas-lms,arrivu/arrivu-lms,sli7246/canvas_branch,fronteerio/canvas-lms,snehakachroo1/LSI_replica,wrdsb/canvas-lms,gbleydon/canvas-lms,arrivu/hoodemo,sli7246/canvas_branch,Unow/canvas-lms,antoniuslin/canvas-lms,antoniuslin/canvas-lms,narigone/canvas,instructure/canvas-lms,venturehive/canvas-lms,whalejasmine/canvas-lms,leftplusrightllc/canvas-lms,sdeleon28/canvas-lms,merichar/canvas-lms,jay3126/canvas-lms,HotChalk/canvas-lms,loganrun/pincan,parbros/red-innovadores-lms,fronteerio/canvas-lms,whalejasmine/canvas-lms,instructure/canvas-lms,leftplusrightllc/canvas-lms,Rvor/canvas-lms,rup/Tarrax,roxolan/canvas-lms,arrivu/jigsaw-lms,usmschuck/canvas,HotChalk/canvas-lms,arrivu/jigsaw-lms,instructure/canvas-lms,AndranikMarkosyan/lms,Jyaasa/canvas-lms,SwinburneOnline/canvas-lms,Jyaasa/canvas-lms,sfu/canvas-lms,dgynn/canvas-lms,greyhwndz/canvas-lms,landonwilkins/canvas-lms,eCNAP/CANVAS,matematikk-mooc/canvas-lms,va7map/canvas-lms,parbros/red-innovadores-lms,shidao-fm/canvas-lms,arrivu/qibla-ecampus,sfu/canvas-lms,arrivu/hiring-site,eCNAP/CANVAS,whalejasmine/canvas-lms,gbleydon/canvas-lms,jay3126/canvas-lms,redconfetti/canvas-lms,whalejasmine/canvas-lms,leftplusrightllc/canvas-lms,venturehive/canvas-lms,redconfetti/canvas-lms,sdeleon28/canvas-lms,utkarshx/canvas-lms,sfu/canvas-lms,wimemx/Canvas,AndranikMarkosyan/lms,wrdsb/canvas-lms,arrivu/arrivu-lms,Jyaasa/canvas-lms,sfu/canvas-lms,skmezanul/canvas-lms,sdeleon28/canvas-lms,instructure/canvas-lms,Jyaasa/canvas-lms,efrj/canvas-lms,venturehive/canvas-lms,wye0220/shindig-canvas,juoni/canvas-lms,Unow/canvas-lms,grahamb/canvas-lms,roxolan/canvas-lms,va7map/canvas-lms,kyroskoh/canvas-lms,nditech/red-innovadores-lms,dgynn/canvas-lms