Overhauled CORS support

rewrote CorsService and CorsFilter to be more configurable, customizable, and adherent to the spec.