Code cleanup for recent file lists & alternative implementation for #365

First commit cleans up `recent_file_loaded()` and `update_recent_menu()` to avoid most code duplication in handling of both toolbar's and menubar's menus.

The second one is an alternative implementation of #365 that also fixes updating when ~~opening a project not from the recent list~~ closing a project.