Cache access to mpc-hc.ini (both read and write)
Make access to cached mpc-hc.ini thread-safe

Access to mpc-hc.ini cache map is now serialized.
A race was possible between filter graph thread and main thread, as
some internal filters use CWinApp::GetProfileX() functions to load its
settings.
Save mpc-hc.ini in UTF-8
Replace "On top > Never" by "On top > Default".

In most of the cases "On top > Default" will have the exact same behavior than "On top > Never" but it won't try to override the "on top" flag if an external tool sets it.

This commit fixes #2689.
Merge pull request #48 from alexmarsev/ini_cache

Cache access to the mpc-hc(64).ini for faster settings loading/saving.

Refs: #2837.
Partially re-write CVMROSD, this fixes a case of truncated pointers on x64, adds minor performance improvements and adds extensive ASSERT and TRACE functionality for debug builds.
Change the functions for detecting the display adapter in MPCVideoDecFilter for DXVA uses. Note that when not directly connected to the DXVA2 interface functions (EVR mostly), this function queries the adapter the main video window is on. That adapter is not necessarily the adapter the video renderer will be using, so this system is not ideal at all.
Change a few types, optimize a few loops for CDXAReader. Change _tcstol() to _tcstoul() once, as _tcstol() is only meant for signed integers.
Optimize and simplify the two ExtractMediaTypes functions in DSUtil.
Optimize HMSF2RT() in DSUtil.
Optimize the ConvertMBCS() and UrlEncode() functions.
Edit Scale2x.cpp: make the SSE2 routines x86 compatible, re-order EMMS instructions for MMX routines (SSE-level builds only), change the SSE2 and MMX routines to reside inside the same functions, implement compiler context switches, comment out unused functions, mark functions as static __forceinline and extern appropriately. No changes in functionality of the Scale2x() function.
Manually inline functions that were already marked for integration (__forceinline). Add CPUID -dependent context switches to the existing compiler context switches. No changes in functionality. Similar issues like the ones are/were present in Scale2x.cpp are also present in AvgLines.cpp, it could use the same optimizations.
libmpeg2; Remove a warning disable, remove inline assembly, edit the c++ code in copy_chunk() to avoid pointer aliasing performance issues, decrease the main loop size and correct some wrong types for working objects.
Amend changes to VMROSD, implement SetSize().