Use of % in calcualting remainder can give negative values

The function to_modulo uses % to compute the remainder. This means that one can get negative remainders, e.g. ((-1).to_modulo(4)).remainder() is -1. This is usually not the expected behaviour in modular arithmetic (in the previous example I would expect to get 3). Can be fixed by using rem_euclid instead of %.