feat(minErr): allow specifying ErrorConstructor in minErr constructor

In some cases, the type of Error thrown by minErr is meaningful, such as in $q where a TypeError
is sometimes required. This fix allows providing an error constructor as the second argument to
minErr, which will be used to construct the error that gets returned by the factory function.
chore($q): convert thrown Error to $minErr when calling $q constructor without resolver
chore($q): replace plain TypeError with minErr+TypeError in cyclical resolve check