Make InstantiatingTemplate depth checks clearer

The bool conversion operator on InstantiatingTemplate never added value and
only served to obfuscate the template instantiation routines.

This replaces the conversion and its callers with an explicit isInvalid()
function to make it clear what's going on at a glance.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@192177 91177308-0d34-0410-b5e6-96231b3b80d8