fix(input): check `scope.$$phase` only on `$rootScope`
fix(ngEventDirs): check `scope.$$phase` only on `$rootScope`

Closes #8891, #8849