Saving custom attributes on PUT

POST doesn't work because at the time custom_attributes method is run,
cls.id has not yet been set. I've also disabled saving custom attribute
values in record builder, because obj.custom_attribute_definition is
not defined.
Saving custom attributes on POST

Not the cleanest solution (attributable_id first gets saved as NULL and
then updated), but it seems to be working.

I wonder if making using POST/PUT events for saving custom_attribute
values would be cleaner than this.
Some code cleanup