calculate the proper ordering of syncing models, verify that there are no loops.
Changed comment and code format, re code review.
Merge pull request #517 from bcipolli/smart_add_syncing_models

IDOC: calculate the proper ordering of syncing models, verify that there are no loops
MERGE PARTY