Refactor dependency passing code

No need to pass dependencies around. Now dependencies are attached to
the elements that need them (basically). Delegate to htmltools package
to deal with rendering and knit_print-ing HTML.