[core.genmodel] Compute object id for ports based on number of peers

Previously the object id for ports was computed using its multiplicity.
This leads duplicate case values in the dispatcher if the multiplicity
of a port is lower than its number of peers.

Bug 565953

Change-Id: I19cc9e53a897b1d477423cbd7f662cf811a05451
1 file changed