Add X509_self_signed(), extending and improving documenation and tests