Fixed e2e test suite failures

Repaired 20 failing end-to-end tests across multiple areas, including a real product bug where pressing Escape while editing a link in the markdown editor dismissed the entire link bubble instead of just canceling the edit. Also fixed the profile switcher button visibility in e2e builds and hardened various timing and layout assertions to reduce flakiness.