Fix #21: singleton and tags$head are not really compatible with reactiveUI

This commit fixes two problems:

- tags$head content was not properly hoisted into the head
  of the document when UI was reactively rendered
- singletons were not respected in renderUI

This makes it possible for input/output components that rely
on JavaScript libraries to simply put their script/style
dependencies in their input/output methods. This is contrary
to previous versions of Shiny where that approach would work
unless the component only appeared in renderUI/uiOutput and
not as part of the initial page render.