Add ability to inject custom lowering passes from user code

This is the first in a series of pull request that work towards type legalization for better vectorization of non-native vectors, and to support pnacl's 128-bit hard requirement. 

This PR adds the ability to append custom passes to lowering from user code. For us it will be useful for writing tests. Seemed like a worthy front-end feature in general though, so I pulled it out into its own PR for consideration.