Merge pull request #2593 from bantu/ticket/12575

[ticket/12575] Cleanup service_collection_iterator
[ticket/12725] Add Squiz.PHP.DisallowSizeFunctionsInLoops in legacy

PHPBB3-12725