Profile: Fix a premature critical section unlock

While one thread's CMPlayerCApp::InitProfile() is performing the actual
initialization, other threads' calls to that method should not return.

Also migrate to MFC version of CCriticalSection from ATL. It provides
a couple of handy helper classes.