properly build canvadoc/crocodoc urls in attachment helper

fixes CNVS-15230

Test plan:
  1. upload a file to a course
  2. add the file as a module item in the course
  3. clicking on the module item should show the document preview

Change-Id: If7ba18fa3a08302ef3f84d300f08cbb5511a2dc5
Reviewed-on: https://gerrit.instructure.com/40536
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>