fix(tpl): dont cache prev. invokations template
fix(tpl): dont cache prev. invokations template

If we transition to an 'abstract' (read: dynamic) state
that can handle multiple different templates/controllers based
on some value returned to us by a controllerProvider/templateProvider -
we need to make sure we dont use the previous invokation(s) template.

As such, we need to check for the existence of `templateProvider` on
the original state. If that is a function, we need to make a second request
through $templateRequest and manually compile our template.

Related issues:

https://github.com/angular/angular.js/issues/2095
https://github.com/angular/angular.js/issues/1039

kasperlewau/angular-ui-router-modal