mainwindow: remove generic try / except.
project: cast remaining uncasted restriction fields.

Also check that value is not None before trying to cast it
(for example the preset system tries to pass None to these functions)

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720699
timeline: connect to the whole GUI to end marquee selection.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=723035