Fix bugs related to inventory window not behaving, and (hopefully) a bug in which closing a resource window with the X button occasionally reloads the game
Fix a bug introduced with last commit that caused the X button on the botanist window to reload the game.
More refactoring work on the botanist.