intermediate commit, two-dimensional cost notion
Ready for testing the non-infty-action-cost case.
Bugfixes to the (still incomplete) two-dimensional cost stuff.