Add functions forLoopState and numLoopState.

These functions were written for the case where big integers are stored
as two Data.Primitive.MutableWordArrays, and adding two of them requires
the passing of a carry value from one iteration of the loop to the next.

The tests for these use both state in the enclosing monad and the threaded
state specific to these two functions.