Merged with stable.
Improvements for `chef prepare`:
- `Chef` now has a custom `Environment`. This required a few changes in how
  environments are created and initialized.
- Added concept of "command extension", which is pretty much a sub-command.
- The different types of preparations are in their own command extension.
- Added a `prepare feed` command extension to create RSS/Atom feeds.

Miscellaneous:
- Renamed the `xmldate` filter to `atomdate`.
- Added a `pcfail` function to fail the bake or rendering on purpose.
Updated CHANGELOG.
Added reminder to `prepare feed` to add a link to the main page.
Trailing slash support changes:
- Changed `baker/trailing_slash` to `site/trailing_slash` (but the old setting
  is still supported).
- Trailing slashes are also supported in `chef serve`.
Don't crash chef if it's run outside of a website.

--HG--
extra : rebase_source : 5da0841b5651e27c54b7fcafb9bc838f448ebfae
Fixed an argument bug with the `chef prepare` command extensions.

--HG--
extra : rebase_source : f055acf93d362dae80fb8a1ea87ec7df1d6d7cd6
Only show commands that are valid when inside/outside a website.

--HG--
extra : rebase_source : 618e0539f9e2aa21d3e83316426e8a1cf05584c7
Encode pages in UTF-8 before doing any parsing and JSON encoding.
Support giving a custom hostname for the benchmarks.
Big refactor of various page/post iterators:
- Less code duplication, reuse the page iterator in more places.
- Added lots of unit tests.
- Fixed incorrectly ordered monthly archives.
- Fixed confusing behaviour of pagination iterator by locking it against modification.
- Fixed incorrect behaviour when page iterators are used more than one time on a page.
- Fixed a crash when using a `has_xxx` clause on a non-array page setting.
- Made it possible to use post filters in tag/category pages.
Added ability to provide custom date/log formats in StupidHttp.
Fixed missing call to `ftp_close` on error.
Simplified the new website message.
Added a message when nothing is found with `chef find`.
Improving logging, error reporting and error handling:
- Don't include inner exception messages in new exceptions.
- Show exception stack anywhere and exception is displayed.
- `debug` mode should now only be for showing source code (call stacks, etc.)
- `debug` mode gets correctly set in `chef serve`.
- Server now supports configuration variants.
- Simplified code for applying configuration variants.
- Removed useless banner from baker output and CLI.
- Use pretty colors on Mac/Linux for console output when baking or serving.
- Re-added all `chef` commands to the parser, regardless of whether the current
  directory is a website or not. That was pretty stupid actually.
- Global options like `--root` or `--debug` are now really global.
- Added a cache key to help invalidate cached config files when a breaking code
  change is written.
- Modified the system error pages to show updated information about error
  reporting.

--HG--
rename : build/messages/_content/pages/404.html => build/messages/_content/pages/error404.html
Update CHANGELOG.
Changed the way we test for invalid non-UTF-8 encodings.
Added support for "auto-formats".
Added and modified unit-tests.
`MockFileSystem` can use real files too, for when `vfsStream` doesn't work.
Use pretty colors for benchmark results.