Promise.race() based select like pipeTo implementation

Also adds more test cases for pipeTo
Let's keep line length at 120 characters. You can use template strings for multiline, e.g.

```js
test(`longlonglong
 longlong`, t => {
  // test code here
});
```