Return 422 instead of 500 when handling body

Using a 4xx error would be more appropriate for this since the server is parsing the content from the client and needs to let the client know the data is malformed (not the actual HTTP request but i.e. JSON semantics). The definition for 422 is described in [RFC 4918](https://tools.ietf.org/html/rfc4918#section-11.2)
allow POST rest handling to specify path after accepting content
Merge branch 'rest_post_created_path' of https://github.com/treetopllc/cowboy
Implement authorization header parsing

Basic HTTP authorization according to RFC 2617 is implemented.
Added an example of its usage with REST handler.
Merge branch 'feature_basic_auth' of https://github.com/ivlis/cowboy
Merge branch 'patch-1' of https://github.com/CamShaft/cowboy

Conflicts:
	src/cowboy_rest.erl