Merge renderMath() into ctrl.$render add basic inline math support

Since renderMath() is doing much more than just rendering math, it is now a part of ctrl.$render(). This commit also adds basic support for inline math. However, this is not quite ready, using inline math inside of lists or block quotes does not yet work.