use `read_attribute_for_serialization` to serialize ids

* in order to allow some optimisation in simple cases, we call `read_attribute_for_serialization` on parent with association_id name
Merge pull request #223 from tchak/id-serialization-with-hooks

use `read_attribute_for_serialization` to serialize ids