CORS middleware
Created by: szarsti
If you run a request across domains with non standard header (like 'Accept: application/x-msgpack'), browser will run OPTIONS pre-flight check.
This pull requests add supports of such requests in Cowboy middle-ware. As a part of this change I have move setting headers from various handlers to one middle-ware, so it is easier to centrally manage all CORS related headers.