When a `__decorator` expression has no `__metadata` call, example:
```js
__decorate([
ContentChild('heading', { read: ElementRef, static: true })
], FooBarComponent.prototype, "buttons", void 0);
```
A `Cannot read property 'kind' of undefined` error will be thrown.
Closes: #15703
Followup to https://github.com/angular/angular-cli/pull/15239, fixes a 6kb size regression in new apps, potentially more in larger apps.
Local declarations inside `@angular/core` files should also be considered metadata and scrubbed.
We used to keep a specifier list of known specifiers to identify the `@angular/core` FESM. But it doesn't work for non-FESM bundles, and we already pass that information on anyway.
Build optimizer was broken for non-FESM files inside @angular/core because it couldn't identify relative imports were still inside core.
This change adds a known list of angular core files as a default, and also allows passing in a override.