Reduce duplication between the different platform implementations of the update dialog

Add an UpdateDialog base class which the different platform
implmentations implement and use this to:

 * Remove the duplicated runWithUi() functions in main.cpp
 * Reduce the amount of boilerplate for loading the GTK dialog at
   runtime and falling back to the non-GTK 'dialog' if this fails.

MD-19678 #time 1h
Run the update installation test as part of the 'make test' target

 * Add a test which runs the test-update.rb script
 * Add a --auto-close option to the updater which auto-dismisses the
   update dialog once installation is complete. This is used in
   test-update.rb to make the script run without user interaction
   being required.

MD-19678 #time 1h
Add missing UpdateDialog.cpp file

MD-19678 #time 5m
Fix Mac implementation of --auto-close option

Invoke [NSApp stop:] on the main thread. When invoked from
UpdateDialogCocoa::updateFinished() on the background thread
it had no effect as [NSApp stop:] only stops the current run loop.
Fix Win32 build - add missing include
Fix update installer test on Windows

 * Remove the dependency on Cygwin being installed along with zip.exe
   at a specific location.

   Add a small cross-platform tool in zip.cpp which creates a zip
   file using the contents of a given directory.

   This also removes the need for passing different arguments to 'zip'
   depending on the platform.

 * Fix StringUtils::endsWith()

 * Fix UpdateDialogWin32::quit(), when called on a background thread it
   had no effect. Post the WM_QUIT message to the main thread.
Fix zip-tool build on Mac

Add the Security and Cocoa frameworks as link dependencies
of the shared updater library.

MD-19678 #time 10m