lib: refactor Timeout, ImmediateList, TimersList to class
The prototype is old-style, refactor it to the ES6-class.
Special Note:
Line 139-140 was moved to Line 301-302 because class doesn't support hoisting
// Create a single linked list instance only once at startup
const immediateQueue = new ImmediateList();