Improve window restoring

Zoom or minimize windows before ordering them front, and for the latter, don’t actually order them front (as that magnifies them). Also order front windows without also setting the window as key window.
Don’t assert CFSocket functions always succeed
Introduce heuristic priorities for gutter images

Images with associated text are preferred, after that, bookmarks, and last are custom marks (without associated text).