Remove PhysicsManager singleton and use shared_ptr instead.  Resolves the issue where sometimes destructors were called in an unexpected sequence resulting in a crash while exiting the application.
Initialise null shared_ptr
Another missed null shared_ptr conversion for gcc.
Do not delete physics objects if it was never created (e.g. preview window)
Move the destruction of global resources, being used by multiple documents, to the editor.
Do not destroy overlay if it was never created (e.g. due to an Ogre exception).
Use a separate flag for references deleted by a content file (Fixes #2018)

The flag must be separate so as to not contaminate the user's savegame.

Fixes the following use cases that were broken before:

 - Content file edits a reference that was already deleted by a previously loaded content file -> reference must stay deleted
 - Changed or new content file deletes a reference that is already present in the user's savegame -> reference must be deleted
 - Said content file is disabled again - reference must be undeleted
memory leak fix
Merge remote-tracking branch 'scrawl/delete'
Move AiWander path finder to temporary storage (Fixes #2082)
Disable third person zoom feature by default due to usability issues (Fixes #2129)
Combat AI: Don't attempt to cast spells when impossible to succeed (Fixes #2059)
Implement Clamp mode for NiTexturingProperty (Fixes #2050)
Don't use transparency override if there's no transparency (rug fix for Bug #2050)
Make ToggleMenus close open windows (Fixes #2045)
Fix dialogue goodbye link conflicting with choice links
AiWander: move idle animation handling to non-delayed section (Fixes #2073)
Don't update nodes with an empty name from the skeleton source (Fixes #2125)
Remove incorrect implementation of the iAlarm* GMSTs, not used by vanilla MW (Fixes #2064)

According to Hrnchamd, these are unused. The real mechanics are not fully documented, but from a quick test only NPCs with an alarm value of 100 will report crimes.
Crime update: NPCs can report crimes if they didn't see the crime, but were alerted by someone who saw it and did not report it themselves.