Total refactor of the analyzer data structures and logic.

Goal here is to make it a self-maintaining data structure that keeps
itself up-to-date, where previously it was a bunch of dumb model objects.
This will make it easier to write the data flow analysis and optimization
code by keeping all of the structure-maintenance logic in one place.

This is a pretty big patch that probably should've been split into smaller
ones, but it's getting kinda late and I'm fading so I'm just gonna cheat.