Improve environment settings

Optional add local config for every environment. Now switch NODE_ENV
will switch local config.
Merge remote-tracking branch 'upstream/master' into pr-localenv
Merge pull request #1640 from clarkorz/findOne2findone

Fix policies don't protect `findOne` action
Added engine options configuration to res.view implementation.
Merge branch 'master' of https://github.com/balderdashy/sails

Conflicts:
	lib/hooks/views/res.view.js
Reverse commit 2e83ed6, since we realized we can just set sails.config.views.locals to do the same thing.
Monkey-patched our monkey-patched Consolidate to give a more helpful Jade error message.

refs #1629
Allow a request to be passed as the argument to sails.sockets.id.
Send `locals` as second argument to `res.render`
This allows locals specified by the user to override `res.locals`, which, as a function, has some immutable properties like `name`.  Currently, we're merging all of the user-defined locals into `res.locals`, so those immutable properties are squashing some user-defined ones.
refs #1628
Formatting, added the allParams() method discussed in issues (synonym to req.params.all())
Merge branch 'master' of github.com:balderdashy/sails
allParams() is a function.
Fixed bootstrap code.
Passes errors straight through.  Also makes res.ok() send data as JSON/JSONP if it cannot find the specified view.
Added test for bootstrap
Improve bootstrap test
More tests- and now bootstrap function call is wrapped in a try/catch that passes the error to the callback.
Update captains-log dependency's min version
Fixed default behavior for notFound, added default JSON output for other statuses.
closes #1620
good stuff