Make the subclassing of Primitive attrs more flexible.

Sometimes attributes cast the same in both directions
and other times they need different casting for the
different directions.

Make both easy.