You can close all windows by either clicking on the Command Menu button `Close All' or by typing meta-l meta-c. If there are any changes, you'll be asked if you want to save them.