Add application context argument to all oauth2 and oauth2_backend API
functions
Update in oauth2:authorize_password documentation
Merge branch 'IvanMartinez-context'
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
Merge pull request #32 from synlay/feature/appctx_dialyzer_tweaks

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.
Merge pull request #34 from danielwhite/fix-binary-expiration-values

Fix binary encoded expiration values
Bump version 0.5.0
Export types auth/0 and priv_set/0 for a better analyzing of backend
implementations
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.
Merge pull request #35 from danielwhite/authorize-resource-owner

Allow authorization with a previously authenticated resource owner
Merge pull request #36 from synlay/feature/dialyzer_tweaks

Export types auth/0 and priv_set/0 for a better analyzing of backend implementations
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.
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.
Merge pull request #40 from synlay/feature/otp_17.0_dependency_update

Add Erlang/OTP 17.0 to the Travis CI test matrix and update meck dependency