Discard .ini cache when it's not being accessed

Refs #4193
Use the right prefix for bool variable
FileAssoc: don't use static methods
FileAssoc: don't use static variables
Construct CAppSettings in InitInstance()

It allows us to use COM objects in CAppSettings ctor.
Reduce header dependencies
Cosmetics

Placed 'extern' functions together.
Marked local functions as 'static'.
And some minor clean-ups and cosmetics.
Use 'override' keyword
A bit more sane hooks declaration
Simplify setting heap information
Add simple readers-writer lock implementation
Prepare for new osd engine

 - Adds thread-safe playback state storage class
 - Encapsulates seekbar thumb drag logic to be reused
   in new osd seekbar
Get rid of start time in PlaybackState::Pos struct
MainFrame: refresh metadata less aggressively

In 4cf10a we started to resend same metadata repeatedly to both api and
skype. In this commit we do it only if the metadata actually changes.
MainFrame: fix taskbar clip area calculation
Separate TaskbarList from MainFrame and SeekBar
We herd ya liked reverts

This reverts commit 36adc3a8e3bcb3e3408db9349b65fe9d2ca66e1e.

Maybe one day it will go upstream in one form or another.
Controls: redraw after recalc layout

Video renderers paint messages may delay controls redraw otherwise
Disable madvr exclusive mode on fullscreen exit
MainFrame: repaint evr when requested