gio/tests/tls-certificates: fix

da053e34 broke the tls-certificates test by requiring the backend to
implement g_tls_certificate_verify() (which the test TLS backend
didn't). Add a trivial implementation to make the test pass again;
we'll need something more complicated when we add tests that are
supposed to get errors.
Guard g_inet_address_mask_equal against invalid input

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