[#1210] Require a logged in user by default except for get actions

By default, any auth function not in get.py will not allow anonymous
access, ie will require a logged in user to be performed. Core auth
functions are automatically configured when building the `AuthFunctions`
cache, but two decorators are provided to allow defining exceptions
in both cases and extensions to define the behaviour on their own auth
functions. The decoratos are `auth_allow_anonymous_access` and
`auth_disllow_anonymous_access`.

`check_access` will check for the auth_allow_anonymous_access attribute
on the auth function, and if False and there isn't a validated user
object in the context, it will raise a NotAuthorized exception.
[#1210] Fix auth tests and tweak auth functions

Add the anon access decorator to some functions as they require it in
some circumstances.

The storage controller was calling `is_authorized_boolean` directly,
which should be never done (same for `is_authorized`).

It would be god to refactor password_reset out of user_update, so
user_update does not require anon access.
[#1210] Add decorators to the plugins toolkit
[#1210] Yet more tests fixes
[#1210] Add user object to context in controllers

The base controller already checked whether there was a user object in
the db for the user name provided. If we added it to the context we save
the same check on check_access.
Merge pull request #1189 from okfn/1180-groups-orgs-404

[#1180] Raise 404 for org or group if called wrong
[#1211] Correct a typo
Merge pull request #1211 from okfn/1211-add-exception-guidelines

Add exception guidelines to Python coding standards
[#1210] Minor changes after review
[#1210] Add some docs
[#943] Autodoc the plugins toolkit

ckan.plugins.toolkit isn't compatible with autodoc. Autodoc supports
modules and classes, but the plugins toolkit is actually an
object-instance masquerading as a module.

Added a Sphinx extension to do what autodoc does for classes and
modules, but for the plugins toolkit object.

Added a custom __dir__() method to the plugins toolkit so that
inspect.getmembers() works as desired for it.
[#943] Add some docstrings to lib/base.py

These are functions that are imported into the plugins toolkit, so they
need docstrings.
[#943] Add a docstrings to lib/cli.py

This class is imported into the plugins toolkit, so it needs a docstring.
[#943] Add some docstrings to helpers.py.

Everything in the template helpers module should have a docstring.
[#943] Add a docstring to Invalid exception

This exception is imported into the plugins toolkit so it needs a
docstring.
[#943] Improve DefaultDatasetForm's docstring
[#943] Add some docstrings to logic/__init__.py

These functions and exceptions are imported into the plugins toolkit, so
they need docstrings.
[#943] Add some docstrings to plugins/toolkit.py.

Everything in the plugins toolkit should have a docstring.
Merge branch 'master' of github.com:okfn/ckan into 943-writing-extensions-tutorial
Add config template stanza for ckan.storage.bucket

This was lost in e0cd7ba46e260b503b4090d1a382c5bc5dcf7db8