Improvements to the memleak tests (#3457)

* Improvements to the memleak tests

* Support passing args
* Do more initialization before looking for at the heap

* Don't use default_backend for something OpenSSL specific
1 file changed