Bugs fixed to allow extension to more than three reaches.

There were bugs in both the CalcU and CalcDelta functions that made the
previous version only applicable to two or three reaches. New test case
is for seven reaches on the Sacramento.