Fully port Docdown to JS

Closes #17, and #18.