ENH: subclassing piecewise polynomials

Make sure subclasses of piecewise polynomials do not decay
to base classes when differentiated etc.