This form builds and runs.  Only tested with beta=2 so far.  Results from Test P are slightly different in value and slower (perhaps a lot slower).  I think the change that happened in the beta = 2 case is the change in the max(K W) code in PISMRoutingHydrology::adaptive_for_W_evolution().
Put computation of max(KW) in right spot.  Avoid unnecessary computation in beta=2 case.  Recovers full speed and exact regression on Test P.