fix(HTTPMethodNotAllowed): Blank body is always returned

This patch fixes HTTPMethodNotAllowed so that if kwargs are given, it
will include those in the body of the response; before this patch, the
body was always empty regardless of whether or not the caller provided
any details via kwargs.
fix(compile_uri_template): accept unicode literals

In Python 2 with `from __future__ import unicode_literals`, any URI
template strings will be of type `unicode`, not `str`.
Merge pull request #271 from kgriffs/fix-http405

fix(HTTPMethodNotAllowed): Blank body is always returned
fix(setup.py): Don't install 'tests' to site-packages
Merge pull request #279 from rouge8/dont-install-tests-to-site-packages

fix(setup.py): Don't install 'tests' to site-packages
feat(hooks): Pass resource to hooks

Make "before" and "after" hooks aware of the resource being acted
upon. This was implemented in such a way that existing hooks will
still work; the framework will detect whether a given hook function
accepts the extra "resource" param, and wire it up accordingly.

Rationale: This change is intended to ease creating more descriptive
and declarative resources. Hooks are the recommended approach for
implementing creating authentication/authorization solutions. However,
Authorization almost always depends on which resource is being
accessed. This patch provides the necessary context for such use
cases.

A good example would be an OAuth (1.0/2.0) where there is an concept
of "scopes" or "realms". Good OAuth middleware should allow
declarations like this:

class Resource(object):
    realms_allowed = ['admin', 'editor', 'viewer']

    @realms('viewer')
    def on_get(req, resp):
        pass

With this patch it will be easier to implement sophisticated
middleware.

Closes #268
chore(AUTHORS): Added Andy and Michał -- Thanks guys!
perf(hooks): Remove extra function call

This patch modifies the backwards-compat resource shim so that
it is simply assigned directly to the hook when possible, rather
than creating a noop passthrough.
Merge branch 'uri-template-unicode-literals' of github.com:rouge8/falcon into rouge8-uri-template-unicode-literals
Merge branch 'rouge8-uri-template-unicode-literals'
fix(hooks): Resource-aware hooks don't work with callable classes

The new resource-aware hooks feature assumed that hooks were functions,
so callable classes (which impliment __call__ explicitly) caused an
error to be raised by inspect.getargspec. This patch fixes that up.
fix(hooks): Resource hooks shim doesn't work for callable classes

If a callable class is passed as a hook, rather than a standalone function,
the heuristic which determines whether or not to apply a shim for
backwards-compatibility with existing hooks does not take into account
that there may be a "self" param for the hook.

This patch modifies the heuristic to take callable classes into account.
feat(HTTPError): Support XML response bodies

Falcon will now return an XML error response if the client prefers that
media type over JSON. The XML will be UTF-8 encoded.

Closes #109
Merge pull request #276 from kgriffs/issues/109

feat(HTTPError): Support XML response bodies
fix(HTTPRangeNotSatisfiable): Don't allow media type to be set

This patch removes the unnecessary media_type param, since 416 doesn't
normally include a body in the response. This change made some code
in the API helper, compose_error_response, unnecessary, so that function
was reworked as well.

Closes #277
Merge pull request #282 from kgriffs/issues/277

fix(HTTPRangeNotSatisfiable): Don't allow media type to be set
fix(API): Content-Length header not set for 416 status

The latest HTTP 1.1 RFC states that the Content-Length header MUST NOT be
set for 1xx and 204. It is also normally not set for 304. 416 is not
mentioned, so we should set Content-Length for it.
doc(hooks): Correct docstrings wrt bound methods
Merge pull request #284 from kgriffs/master

doc(hooks): Correct docstrings wrt bound methods
doc(hooks): Note new resource param in docstrings for decorators