[devtools]: default to issues tab when error overlay is programmatically toggled (#81091)
When there's a build error and we toggle the error overlay on page load,
we should ensure that the issues tab is used rather than the one stored
in session storage, to avoid the case where we bring up the modal
intending to show the user an error but instead show the settings page.
Drive-by refactor: lifted storage variable to the other places where
they're defined
Closes NEXT-4596