fix(ngView, ngInclude): Add template to DOM before linking other directives

Fixes #5247.