Slightly clean up the OpenSSL binding

 - reduce the amount of state needed on the API instance
 - fixed import ordering