refactor lti variable substitutor

to allow for a wider range of variable substitutions

Test Plan: All current variable substitutions should still work

Change-Id: I8260b73d05bc90059b2317ddabce4c064940ecc4
Reviewed-on: https://gerrit.instructure.com/36804
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>