TODO: rebase Better implementation of reduce_base in galgebra

Now uses always bisection algorithm from bisect module
This avoids much special cases and should be slightly faster