Repair rmarkdown plugin for files in subdirectories

Now all generated files properly refer to a single copy
of lib_dir, containing CSS and JS and other files, common
to all Rmd document.
Collections plugin: add index to global metadata, bug fixes

- add index_limit argument
- pattern is optional now, and defaults to all files
- files that do not contain the metadata used as sort key
  all last, in arbitrary order
- fixed a bug for empty collections
Templates: do not prefix global metadata with 'site.'

This plays better with whisker, because that does this kind
of prefixing automatically for composite metadata fields.
Branch plugin, a'la metalsmith.