add RelationId to unboundRelation and refactor some ut used RelationUtil to allocate next RelationId.