[Gtk] Import some fixes from MonoDevelop

Import all the updates to GtkWorkarounds from MonoDevelop,
including:
* hard crash in new Retina icon rendering code
* 64-bit safe on MacOS
* better compution of Mac monitor geometry
* computation of Windows monito geometry
* better key handing when cap lock is on
* safely destroy attached context menus
* some new helper methods and workarounds