Fix: Resolve function types of all contracts before checking types inside functions.
Merge pull request #636 from chriseth/sol_fix_foreignFunctions

Fix: Resolve function types of all contracts before checking types inside functions.