it's by design - one result of the update is that OS X will "gather" any open windows to the active display. You might want to experiment with energy settings, including setting your primary display to power off before the external
You're right. Sadly, that approach wouldn't work, even if it were possible (is it?). I'm pretty sure it's not at power down that the problem arises, it's at power up: the external becomes active just a little bit after the internal, so for a moment the iMac thinks it has only one monitor.
Happily, I have found a solution, in the form of a little app that I already had and used for other purposes: Moom
. I take a snapshot of open windows and tell it to restore those window positions on switching from one to two monitors. It's not perfect, in that PS palettes aren't always handled properly, but for my purposes (keeping Mail, Terminal and some palettes on the external screen), it pretty much solves the problem.