Refactor highlighting

Extract some of the common logic from the renderers. @parkr was looking at what you were doing in #2148 and thought this might be a helpful refactor. Also I think the way options were being set before was a little weird for rouge. It expects line_numbers to be a boolean instead of a string.

If interested I'll clean the test up so they'll pass.