Replace deprecated std::num traits

These traits are akin to the deprecated standard library traits (Zero, One, Primitive) to keep everything running as before. However, for the long term a better algebraic abstraction should be used/provided.

I hope this doesn't interfere too much with other plans to adapt to the new situation. However, I thought it would be worthwhile keeping the test suite running (doctests fail because of warnings).