* Disable property invariance checks for templates
Property invariance checks were already disabled for template
properties, this also disabled the checks for arrays, lists,
class-string-maps, and iterables that contain templates.
Partially fixes#5371
* CS fixes
* Fix and simplify hasTemplate.
Add hasTemplate to TypeNode and simplify implementation with getChildNodes.
* Revert hasTemplate change and add containsTemplate.
* Check class-string too.