Re-design the cleanup functionality of the tray icon

Instead of the tray icon thread trying to clean itself up, call the
destructor externally and wait until it closed itself.
This ensures all resources are free'ed and no race conditions can cause
invalid access later on.

Suggested by Lord.
Close the thread handle of the tray icon thread.
Cleanup and don't deadlock when the tray icon creation failed.
Add VS2013 support
Don't remove the tray icon on-the-fly

Otherwise this could deadlock if the setting is changed from the tray icon
thread itself (ie. the property page is opened through the icon).

Instead just keep the icon active until its cleaned up during shutdown.
Protect tray icon creation with a lock

This ensures that the tray icon cannot be created from multiple places at
the same time.
Update ffmpeg
Map "hevc" to the rawvideo type
Enable rawvideo by default
Redefine H264 DTS pin info flag to be more generic (for HEVC support)
Set Only-DTS flag for rawvideo
Set Only-DTS flag for HEVC in AVI
Unify "Source sends DTS" conditions
Add two additional DV FourCCs (for Canopus)
Add an option to set the index of the GPU to be used for HW decoding

Fixes issue 376.
[MPC-HC] Use our own ffmpeg clone repository.

WARNING: This should be the first custom commit in our fork and its title should not be modified.
[MPC-HC] LAV Splitter: Exhibits MKV attachments through IDSMResourceBag interface.
[MPC-HC] Tray icon: Add an optional custom callback for "show property page" events.