I’ve just been looking into a slightly strange issue where closing Firefox and opening again didn’t clear out session cookies. It looks like in the latest version of Firefox this behaviour is by design if you have certain preferences set.
They have introduced a feature where closing the browser can remember the tabs you had open, and rehydrates these again when you start Firefox. This feature is controlled in the Settings > General > Startup section. If you have this set to Show my windows and tabs from last time, Firefox will no longer expire session cookies when the browser is closed.
This seems to be a pretty big security concern, as you are prompted to switch this setting on the first time you try to close the browser, so the majority of users would have this set-up. I’m not entirely sure how it decides when a session cookie should expire under these conditions, any ideas?

