Add close-handler to flash messages

- added close-handler to flash messages

https://www.openproject.org/work_packages/8458