I have a system like this, but it's much much more complex than most people would want to entertain.
The best way to do it I think would be to have a system whereby the light switches in all rooms revert to the off position in the event of the power being removed.
That way all you'd need is to break the power feed to the lighting curcuit for a second and then restore it, and all lights that were on would be extinguished, a simple N/C momentary switch at the exit connected through a contactor with the required number of poles would facilitate this nicely.
The advantage of my system over the suggested method of having a large disconnection switch at the exit, is that nothing needs to be done on your return to allow the lights to work again. Also no real additional wiring is required other than that through the contactor and the feed to the exit NC switch.
As for finding/constructing switches that will revert to the off state once the supply has been removed, I'm not sure if any such thing is commercially available, but anything non mechanical i.e electronic would presumably have this 'feature' If nothing can be found then a simple relay switch that latches on would do nicely.
If you are interested in this system I could elaborate further on how the light switches could work, but in essence a NO and an NC momentary switch feeding a SPCO relay with the NC in series and the NO applying power to the coil with the relay contacts in parallel with the NO switch and the light fitting in parallel with the relay coil.
Hope this helps!
-Dan