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 float for setting skill use values.  Should resolve bug #2183.
Merge remote-tracking branch 'cc9cii/master'
Merge remote-tracking branch 'remotes/upstream/master' into single-instance

Conflicts:
	apps/opencs/editor.cpp
Workaround file lock being lost if the same file is closed elsewhere in the program (see https://svn.boost.org/trac/boost/ticket/3582)