Do more robust sourcemap restoration in Compiler.restoreState
Do more robust sourcemap restoration in Compiler.restoreState

My fix for restoring sourcemaps during multistage builds wasn't complete enough.
This caused NPEs when building some projects.
I've fixed this by duplicating more of the sourcemap initialization logic
in `restoreState()`.

PiperOrigin-RevId: 453443536

nawawi/closure-compiler,google/closure-compiler,monetate/closure-compiler,ChadKillingsworth/closure-compiler,nawawi/closure-compiler,ChadKillingsworth/closure-compiler,nawawi/closure-compiler,monetate/closure-compiler,ChadKillingsworth/closure-compiler,google/closure-compiler,monetate/closure-compiler,monetate/closure-compiler,google/closure-compiler,nawawi/closure-compiler,google/closure-compiler,ChadKillingsworth/closure-compiler