Update Plugin API from HTMLElement to PluginElement

The TypeScript API published on npm exposes `PluginApi.hook` with a
constraint on HTMLElement.  The implementation in gr-public-js-api.ts
uses a `PluginElement` which exposes a few more properties such as
`change` or `revision`.

Thus, when using the hook and passing the following code through tsc:

  plugin.hook('commit-container').onAttached( element => {
    element.change;
  } );

TypeScript complains with:

  error TS2551: Property 'change' does not exist on type 'HTMLElement'.
  Did you mean 'onchange'?

Update the TypeScript Plugin API hook(), registerCustomComponent() and
registerDynamicCustomComponent() to match the implementation changing
type from HTMLElement to the child class PluginElement.

Release-Notes: TypeScript API: fix PluginApi exposed type from HTMLElement to PluginElement
Change-Id: Ia96c71bbfc11c30e76c121c24cc6d0b9eec819c7
diff --git a/polygerrit-ui/app/api/plugin.ts b/polygerrit-ui/app/api/plugin.ts
index 8630f75..c595add 100644
--- a/polygerrit-ui/app/api/plugin.ts
+++ b/polygerrit-ui/app/api/plugin.ts
@@ -9,6 +9,7 @@
 import {ChangeReplyPluginApi} from './change-reply';
 import {ChecksPluginApi} from './checks';
 import {EventHelperPluginApi} from './event-helper';
+import {PluginElement} from './hook';
 import {PopupPluginApi} from './popup';
 import {ReportingPluginApi} from './reporting';
 import {ChangeActionsPluginApi} from './change-actions';
@@ -63,7 +64,7 @@
   suggestions(): SuggestionsPluginApi;
   eventHelper(element: Node): EventHelperPluginApi;
   getPluginName(): string;
-  hook<T extends HTMLElement>(
+  hook<T extends PluginElement>(
     endpointName: string,
     opt_options?: RegisterOptions
   ): HookApi<T>;
@@ -72,12 +73,12 @@
   popup(): Promise<PopupPluginApi>;
   popup(moduleName: string): Promise<PopupPluginApi>;
   popup(moduleName?: string): Promise<PopupPluginApi | null>;
-  registerCustomComponent<T extends HTMLElement>(
+  registerCustomComponent<T extends PluginElement>(
     endpointName: string,
     moduleName?: string,
     options?: RegisterOptions
   ): HookApi<T>;
-  registerDynamicCustomComponent<T extends HTMLElement>(
+  registerDynamicCustomComponent<T extends PluginElement>(
     endpointName: string,
     moduleName?: string,
     options?: RegisterOptions