Generalized pattern compilation

This required a  more fleshed out Cored class, containing support for more than
just lifting Core.