tests: added certificate chain unit tests

We add a new intermediate CA and a new server certificate signed by this
new CA. Unit tests verify that the chain is loaded successfully and that
the old behavior is kept by loading a file with an invalid chain.

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