Make cowboy_resource a sub-protocol

Handlers now pass their own module and options in the dispatch env
option directly. The handler is upgraded to a cowboy_resource by
returning {upgrade, protocol, cowboy_resource} or {upgrade, protocol,
cowboy_resource, Req, Options} from init/3.
Merge pull request #2 from fishcakez/resource-sub_protocol

Derive cowboy_resource from cowboy_sub_protocol