split parser out into a separate file
expose parse functions on module and write tests
Merge branch 'separate-parser' into master

Clean up index.js and move out the html-specific stuff into
./src/parse.js instead of piling up into the index file.

Also, there are some new tests that look specifically at the parser
functions.