Fixed issue where delegates wernt deleted on removal causing issues with gui forms
Changed guiDelegates to use linked list due to better performance
Changed locks to use lock_guard
Fixed crash in mcf due to nullptr
Added virtual deconstructor
Cleaned up old code
Fixed crash on exit
Merge pull request #870 from lodle/eventcrashfix

Crash Fixes