timers: fix arbitrary object clearImmediate errors
Fix errors that are caused by invoking clearImmediate with arbitrary objects. (e.g. clearImmediate({})
)
- Fix in
timers.js
fixes the REPL crash. - Fix in
internal/timers.js
fixes another error that gets thrown.
Both of the above already exist in the clearTimeout
path.