Allows declaring a bundle's namespace in generated typings file,
which should correspond to the global object representing the module
inside its bundle.
BREAKING CHANGE
The router was previously exported as ng.router in the
angular.sfx.dev.js bundle, but now it is exported as ngRouter.
Closes#2948Closes#3544
Without this feature, each bundle would have to create its own typings
template to include references to dependent typings. Now, the references
can be declared in JS, along with other meta information about the
bundle typings.
Closes#3540
When we are creating a type definition file for a class has a private constructor,
we convert it to a combination of an instance of a concrete type with no constructor and an interface that contains the other methods.
When this happens, we must also convert the class's heritage from
`implements` to `extends` since interfaces cannot implement other interfaces
or classes.
Fixes a problem with #2996Closes#3002
This means that we can now run just the d.ts file generation by running:
```bash
gulp docs/typings
```
In addition the type definition generation was messing with the other docs tasks
so separating it also fixes problems there.