Refactor api html rewriting and parsing

refs #CNVS-11032

This was originally part of fixing the above bug (11032)
but we sent a different patch for hotfixing that
solved the problem in place.

This is the remainder of that patch which
refactors out the html content, media tag, and link
processing into their own more focused objects

Change-Id: If2d59c09c99117ab8de798f74b4513fb628bafd5
Reviewed-on: https://gerrit.instructure.com/40395
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>