Implement new Stance system

In theory this should work well enough (can't test it just yet as there
is no stance UI), but counterattacks are not prioritized; in rare cases
another unit may get a turn before the counterattack happens.  I think
there might be a few other bugs as well...