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.
Update ffmpeg
Update changelog and version
Update developer_info
Pretify ffmpeg build options
Update ffmpeg for a mov/aac decoding regression