Move request dispatching into separate method
`catch_errors` decorator accept `errorhandler` argument
Test `catch_errors` decorator
Make method from `send_api_error` function
More meaningful name for API errorhandler

We not just send API error to endpoint user but may write to log or even do
something else.
Update docstring for `dispatch_api_request`
Update version number
Remove blank lines
Create extension method to make api response
Update docstring for `make_api_response` method
Catch `HttpException` during request dispatching

This allow to use `flask.abort` in your view functions, as well as in request
pre and post processors::

    from functools import wraps

    from flask import Flask, g, abort
    from flask.ext.apify import Apify

    app = Flask(__name__)
    apify = Apify(app, url_prefix='/api/v1')

    def login_required(fn):
        @wraps(fn)
        def check_permissions(*args, **kwargs):
            if not hasattr(g, 'user') or g.user is None:
                abort(403)
            return fn(*args, **kwargs)
        return check_permissions

    @apify.route('/status')
    @login_required
    def status():
        pass

    app.register_blueprint(apify.blueprint)

    if __name__ == '__main__':
        app.run(debug=True, port=5000)

And response will be serialized according to your request headers::

    curl -I http://localhost:5000/api/v1/status \
         -H 'Accept: application/json-p'

    HTTP/1.0 403 FORBIDDEN
    Content-Type: application/json-p
    Content-Length: 159
Returns 500 Server Error if exception has no status code
Rename `raw` variable to `payload`
Prepare response payload in separate statement
Add `http` module to help deal with HTTP status codes
Log exception captured while dispatching request to app logger
Add logging test case
Merge pull request #10 from vitalk/refine-request-dispatching-via-api

Refine request dispatching via api.