Better simplification of cast(cast(int))

This helps bounds inference prove that things aren't going to overflow.
Style cleanup. Add HalideRuntime.h as a dependency for tests as it is
good to include it to get type checking on routines delcared therein.
Merge branch 'master' into overflow_checks