Overlay: Change refCount logic again, re-introduce ownRefCount.

* Re-introduce ownRefCount to track own refs.
* Create class D3D9StateAccess extending Mutex to track own code calls.
* Clean up doPresent - Mutex (CriticalSection) is reentrant/recursive.
Greatly simplified logic.