Load types from all cffi modules before declaring functions or macros

This change loads all the types via cdef & then loops over the macros
& functions and cdefs them. The advantage of this approach is that you
can define the types in the right modules without worrying about
import order. For example, if you need the BIO typedef in the asn1
module but it is defined in the bio module you can still import
the modules alphabetically and expect that BIO will be properly
declared.