refactored Markdown class to use traits

all markdown features are now in a trait so composing new markdown
flavors is as simple as adding traits to the class.

Additionally this adds an abstract syntax tree.
Is this necessary?