Enable side-loading of has_many, through associated resources.

This PR updates the restpack serializer to properly handle has_many through associations. I added tests to demonstrate that it was previously broken but is now fixed.
When we were looking at this, there was an `unless ids.empty?` wrapping these two lines.  Just curious why they were removed, since each resource could potentially have an empty `links` key in the JSON. :)