Improved the build optimize time by more aggressively chunking common code, resulting in the removal of duplicate code. This drastically cuts the build and plugin install time and overall bundle asset size.

[Fixes #14813] [ui/bundles][optimizer] only use caches when in dev mode #15780