Make testsuite robust against disabled formats

Skip tests if their file format is not supported by the
available loaders.

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