`setTimeout` and `setInterval` with `unref` and `ref` like in node.js