Has_many defaults to empty if ids array is nil

Useful when adding new #has_many relations to Ublisherp models. Without
this you would need to republish all the items for serializer to set
empty array of related items ids. With this change you don't need to
republish anything.