Do not type cast twice on attribute assignment

The definition of `write_attribute` in dirty checking ultimately leads
to the columns calling `type_cast` on the value to perform the
comparison. However, this is a potentially expensive computation that we
cache when it occurs in `read_attribute`. The only case that we need the
non-type-cast form is for numeric, so we pass that through as well
(something I'm looking to remove in the future).

This also reduces the number of places that manually access various
stages in an attribute's type casting lifecycle, which will aid in one
of the larger refactorings that I'm working on.
local variables with `_` in the front is also a convention to not used variable. Since this class is the base class to user defined types and people may want to override this method as it is documented I think is better to make explicit here what this argument means.