Implement width inference

It's necessary to know the width of every node as otherwise the widths
won't match up with what comes out of the C++ emulator's VCD dump.
The Flo backend for Chisel does not appear to give me the width of
every node, so I have to infer them myself.

I believe this width inference algorithm should be sufficent: in other
words, I should be able to infer the width of anything that Chisel
manages to output.  I haven't figured out the semantics of every
opcode, just the ones I've managed to generate.

Unfortunately, the algorithm is a bit complicated.