Promise.race() based select like pipeTo implementation

Also adds more test cases for pipeTo
I prefer to just do

```js
setTimeout(() => {
  ...
}, 100);
```