Control lifetime of BIGNUM objects from openssl

Peter Edwards requested to merge peadar/m2crypto:master into master

With SWIG, if we return OpenSSL objects that we expect to be cleaned up, we need to tell SWIG that the functions that create them are indeed allocating new instances of them, and also tell SWIG how to delete the objects when they're finished.

Do this for BIGNUM objects allocated by the bin_to_bn and mpi_to_bn functions here. Without this change, all functions allocating BIGNUM objects will just leak the objects they create.

Merge request reports