Add class for self-stabilizing algorithm.

This class is as yet untested.