work in progress, lots of changes

trying out alternative eval model that splits all branches and looks
for loops explicitly. this leads to more precise analysis at the expense
of larger generated code. in the end we'll need to balance this, but
right now the goal is to see how far analysis can be pushed.

this commit also adds some new unit tests