Refactor modes into their own class heirarchy.

Move control of svg rendering partially to the mode class. This allows
for much finer control over rendering features, such as doing both
outline and stroke at the same time.

Refactor tests.