Add cors middleware

This adds another middleware that adds a preflighted CORS request to your base controller class and enforces strict security for CORS requests in your app to not allow CSRF

To make your controller method respond to a CORS request, extend from ApiController and simply annotate it with @CORS 
To enable the preflighted CORS OPTIONS request for all urls starting with **/api/v0.2/**, add something like this to your routes where ApiController is present

```php
array('name' => 'api#preflighted_cors', 'url' => '/api/v0.2/{path}', 'verb' => 'OPTIONS', 'requirements' => array('path' => '.+')),
```

CORS is used to allow webapps and websites to access your API methods and can be a potential threat for CSRF.

More information on that https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

@LukasReschke @MorrisJobke @LEDFan @DeepDiver1975 @tanghus @cosenal