This PR upgrades RxJS to version 6 and switches to a fork of `stream-to-observable` which includes an updated version of `any-observable` that supports RxJS 6 until https://github.com/jamestalmage/stream-to-observable/pull/10 is merged. The primary change in this version of RxJS is the movement of stream operators from `Obersable.prototype` to the `rxjs/operators` module. Some of the operators, like `catch` and `do`, have been renamed (`catchError`, and `tap`). The Obsevable factories have also been moved from static methods on the `Observable` class to named exports of the root `rxjs` module. Some of those factories have also changed slightly, like `fromEvent` which now emits arrays if the event handler is called with multiple arguments.
```js
// import the Rx namespace to get the Observable factories
import * as Rx from 'rxjs';
// import the operators as named imports
import { map, tap, switchMap } from 'rxjs/operators';
```
In order to make the license that applies to each file as clear as possible, and to be consistent with elasticsearch, we are adding Apache 2.0 license headers to the top of each file.
Existence of this header is enforced by eslint and tslint and missing headers were automatically added in the last commit by running:
```
node scripts/eslint --fix && node scripts/tslint --fix
```
* [tslint/kbn-pm] apply autofixes
* [tslint/kbn-pm] whitelist all console.log calls for now
* [tslint/kbn-pm] sort object keys alphabetically
* [tslint/kbn-pm] use comments to "fill" empty blocks
* [tslint/kbn-pm] use I-prefix for interface names
* [tslint/kbn-pm] use arrow-functions where possible
* [tslint/kbn-pm] use lowerCamelCase for variable names
* [tslint/kbn-pm] prevent shadowed variable names
* [tslint/kbn-pm] avoid variable name and type clashes
* [tslint/kbn-pm] replace console.log statements with bare-bones logger
* [tslint] lint typescript code
* [tslint] filter projects when running specific project
* [dev/ts] use more explicit types
* [dev/ts] add note about why using glob
* [dev/ts] rely on ts, use fewer getters
* [typescript] add typescript support for the server and browser
* [ts-jest] upgrade to latest version
* [jest] support test.tsx files
* [jest/ts] modify `ts-jest.tsConfigFile` config based on filePath
* [types] use correct major version of minimatch types
* [jest] add ts support to x-pack jest config
* [ts/projects] fix tsconfig.json not found error message
* [optimizer/ts] use lowercase jsx option
* [tsconfig] remove ui/* alias
* [plguin-helpers] remove mention of `buildSourcePatterns`
* [plugin-helpers] expect typescript to be a devDep
* [dev/build] place transpile tasks next to each other
* [ts/x-pack] add common and server directories to ts project
* [dev/ts/project] use a limited set of globs to find tsconfig files