move metadata from user's work space to the rmarkdown package environment

fixes #219 and also fixes rstudio/shiny#570
export metadata
Merge pull request #227 from rstudio/bugfix/metadata

move metadata from user's work space to the rmarkdown package environment