branching version of l2r binary xgcd.  it is slower of course