Optimize CPU intensitive Compiler methods

This commit contains some performance optimizations in methods
that showed up as very time consuming in the profiler when running
the rake following rake tests:

benchmark:many_modules:run
benchmark:defined_types4:run
benchmark:defined_types:run

CPU consumption with this patch in place is between 70% - 75% of
what it used to be.

Profiling was performed using stackprof
https://github.com/tmm1/stackprof
It's unfortunate that there are existing instances that need to be scrubbed, but we prefer `&&` over `and` and `||` over `or`, primarily because the latter introduces bugs when people don't realize their precedence.