Make mock functions accessible using __getitem__

Mock functions were previously referred to using __getattr__: mock.func
Now it's also possible to use __getitem__ for that: mock['func']
This makes it possible to use function names that are not valid Python
identifiers, e.g. mock['func-name']
rest_params_parser: produce more useful results

rest_params_parser has been updated to produce more useful results. It
used do always return empty kwargs and '' as the function name, which
wasn't optimal for making assertions about REST HTTP requests.

Now it treats the HTTP resource's path as the function name. The HTTP
method becomes that function's first argument. If we're dealing with
a POST or PUT request, there is a second argument: raw request body. The
function's keyword arguments are generated by parsing the request's
query string.
Merge pull request #2 from tikan/rest

Better support for mocking RESTful APIs