Switch two types which were declared as opaque but are actually integers...

... to an integer type so they can be passed to functions

Split out the opaque typedef fixes from pyopenssl-test_crypto-with-optionals at Alex's request.