Support subclasses without __slots__

If AffineScalarFunc was subclassed by a class that does not use `__slots__` the instance would have a `__dict__`. Support that case.