[api-major] Refactor viewer components initialization to reduce their dependency on the global `PDFJS` object