Core functional representation

Resolves #710 when merged, but not even nearly ready yet.

Not sure there is much to talk about yet, I was hoping to get a bit further with it, so everything is subject to change still.
Remember as well, there will be an "imperative core" for targets like JS and Lua. I think it makes sense to have pattern matching in a functional core, but probably not necessarily in an imperative one. Generally, the functional core shouldn't be concerned with what the compilation target is IMO. Its role is to enable things like tail call optimization and other optimizations (eventually).