Strengthen DevTools Bridge type safety

DevTools Bridge and Wall now use stricter type validation instead of `any` types, with explicit runtime checks that throw errors on invalid messages or post-shutdown operations. Shutdown now reliably flushes queued messages even if cleanup fails.