BugFix: assertion in proof production.

In proof production computePath may produce a reverse subpath.  The functions
addForward in SubPath and addSubPath in WeakSubPath need to handle this.

TODO: clean up code.  The function is basically duplicated.  There is also
the function addReverse in SubPath.