Type inference.

This works by building a type-inference DAG with nodes corresponding to
"type slots" in the AST, and transfer functions between nodes. The nodes
take on values in a semilattice of types, with top (unresolved), bottom
(conflicted), concrete 'simple' (N-bit value) and 'aggregate' (struct)
values, and 'expanding constant' types that join with concrete types to
allow use of integer literals without explicit bit-widths. The transfer
functions and joins are iterated until the values converge.

Also includes a fix to variable scope resolution and a fix to the AST
visitor abstraction. Variable scope is currently dynamic because of the
way that function inlining is hacked together; proper lexical scope and
inlining should come later.