trig_series: add some type checks.
power_series: use macros for the implementation of the degree methods, in the same fashion as trigonometric_series.

This shaves off a few lines of code without being too abstruse to understand.