Task cors check

introduced logic in base Task class to allow users to define CORS support in constructor based on the capability of the hosting web server.

Follows same pattern as base Service class.

if this approach is okay, i will follow up and update documentation.