Don't use the clause processor chain directly.

This changes the APIs from accepting a clause processor chain to
taking a clause processor shared pointer. This is so that:

  1.  the algorithms can operate on a clause processor directly;

  2.  the clause processor chain lifetime is managed correctly.