feat($compile): Allow using functions as templates in directives

Added dynamic template support in directives:
- The call will include the directive attributes common object as a parameter
- This allows generating templates on the fly
- It also applies to templateUrl