Add application context argument to all oauth2 and oauth2_backend API
functions
Update in oauth2:authorize_password documentation
Update deps and prepare 0.4.0
add tuple case to oauth_response, roll 0.4.1
Change now() to os:timestamp().
Changes to how AppCtx is used

Try to harmonize the use of AppCtx in which all functions require a
context that get's passed to the underlying backend functions. They in
return respond with a updated context that get's handed back to the
caller.
Dialyzer tweaks for the new usage of the AppCtx
Preserve expires_in as an integer when converting a response to a proplist

This was intended as a convenience function for encoding the response
to JSON.  The specification indicates that the parameter should be a
number, and not a string.  Translating it to binary in to_proplist/1
makes it more difficult for the encoder.
Fix never expiring access tokens and codes

This number was being encoded as a binary, and later compared to an
integer.  Erlang term comparison rules mean that the time of
expiration was always greater than the current time.

The 'expiry_time' parameter in a grant context is now an integer
rather than a binary.  This may be a breaking change for anyone
relying on this value.

A side issue here was that the mocks in the TTL tests were returning
bad results that would trigger the expected results.
Bump version 0.5.0
Allow authorization with a previously authenticated resource owner

This adds a new function `authorize_resource_owner/3` for establishing
authorization where the resource owner has already been authenticated.
Useful in the case where the Authentication Server is separate to the
Authorization Server.
Export types auth/0 and priv_set/0 for a better analyzing of backend
implementations
Add Erlang/OTP 17.0 to the Travis CI test matrix and update meck dependency

Missing Erlang/OTP R16B01 - R16B03-01 are also added to the test matrix.
Add additional oauth2:authorize_password/6 with previous client authentication and fix for #38

WARNING: Breaks the compatibility with existing backend implementations

The client can now be authenticated before the resource owner's
credentials. See RFC6749 / Section 4.3.2 for more details.
In addition to AppCtx and Scope, oauth2_backend:verify_resowner_scope/3
now returns the ClientIdentity so that oauth2:authorize_resource_owner/3
can set the client for the #authorization{} record and
oauth2:refresh_access_token/5 can be successfully executed.
Fix oauth2_response:to_proplist/1 for correct scoping according to RFC6749 section 3.3

Scopes should be expressed as a list of space-delimited, case-sensitive strings.
Also refactored oauth2_response_tests:to_proplist_test/0 to a property-based PropEr test.
Tweak binary comprehension for oauth2_response:to_proplist/1
Fixes #44 by assuming only confidential clients get refresh tokens.
Merge branch 'no_client_from_resowner' of https://github.com/IvanMartinez/oauth2 into no_client_from_resowner