Make getInstanceOfTceMain public
Add replace usage of while each with foreach

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/commerce/branches/55612@84519 735d13b6-9817-0410-8766-e36946ffe9aa