Add a 'switchify' optimization pass. Refs #1278.

Converting if-elses to switch-case could *potentially* change a O(N)
series of tests into an O(1) lookup.
Reduce clause count threshold for switch creation.

Makes tests easier to write. May change it back later if it proves
suboptimal, but right now we don't know either way.
Fix switchification of top-level ifs.