Supress spurious 'is used as a type' template error message

If a template instantiation fails, a spurious 'XXX is used as a type' error is generated. Suppress it.
Also, when a constraint fails, change the instantiation error into a supplemental error message.

This pull request includes https://github.com/D-Programming-Language/dmd/pull/1789, which it depends on. That one needs to be pulled before this one.