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

Added dynamic template support in directives:
- The call will pass the element and directive attributes as parameters
- This allows generating templates on the fly
- It also applies to templateUrl