Comply with YARA's style
Use OpenSSL to calculate hashes and change prototypes for "richhash" and "imphash"

"richhash" and "imphash" now receive no arguments and returns the hashes, instead of receiving a hash to compare with. This way you can pass the resulting hashes as arguments to other functions and is more coherent with existing functions like hash.md5()
Refactor parse_imports to to reduce complexity and indentation levels