Fix logging on OS X

Passing nullptr to ostrstream's constructor is a nonstandard extension
that libc++ doesn't support, and as it turns out preallocating a buffer
doesn't actually meaningfully improve performance anyway.
Rewrite NumValidator

Split int validating and double validating into two separate classes.

Make double parsing, validating and stringifying locale-aware. This is
far more complicated than it needs to be due to that Aegisub's locale
handling is a total mess.

Use DoubleValidator rather than wxFloatingPointValidator, because the
latter doesn't work with Aegisub's locale mess (on OS X it uses the C
locale for some things, and the locale reported by CoreFoundation for
others).

Closes #1568.
Build osx-bundle-restart-helper via the Makefile rather than as part of bundle creation
Actually copy the current value in IntValidator's copy constructor
Make ffmpeg explicitly depend on zlib
Fix double confirmation when exiting with unsaved changes

For some reason the close event is getting sent multiple times and
them getting processed in the event loop for the confirmation dialog,
resulting in two dialogs.
Lock aspect ratio in the scale tool when alt is held down
Fix saving screenshots of dummy video
Clean up factory_manager a bit
Honor the color matrix tag from the subtitles file when appropriate

If the script's matrix matches the video's matrix, use that even if
Force BT.601 is on, and if it's TV.601, use that even if Force BT.601 is
off.

This should mostly eliminate the common problems resulting from  mixed
values of the Force BT.601 option.

Closes #1649.