Added markdown_with_visitor and markdown_visit_element_list.

This makes it easier to add custom output formats by visiting each markdown element. This does require exposing `element_for_attribute` and making `preformat_text` and `process_raw_blocks` non-static. No exiting code was changed. The visitor pattern was layered on top of existing logic.