Cleaned up some code that relied upon compiler-dependent behaviour on shutdown (i.e. static object destruction order).
Shared: Atomic class should now compile on VS2010. Also hid a signed/unsigned cast warning that's only valid on VS2010 (as the atomic variable is always a long/signed type).