[api] create one unified relationship model

move the relationships of [user|group] and [package|project] into
one table