Unset reference variable after looping by reference for administrator/components/com_[n-z]

- When looping by reference, reference variable is not unset at the end of the loop.
- and a bit CodeStyle

see: https://github.com/joomla/joomla-cms/issues/5482