use `read_attribute_for_serialization` to serialize ids

* in order to allow some optimisation in simple cases, we include two hooks `read_association_id_for_serialization` and `read_association_ids_for_serialization`

This is an alternative to #221 with hooks to allow for optimized AR calls. The default is still to use `read_attribute_for_serialization` all the time to ensure the default less surprising behavior.