Add topic selection to inline thread editing, fixing errors

Co-Authored-By: Brian Talbot <btalbot@edx.org>

TNL-549
Merge pull request #5577 from edx/jsa/tnl549

Fix topic-related errors when editing discussion threads in inline mode.