loader: Fix an infinite loop when printing modules using "module show".

When creating the alphabetical sorted list each module is added to a list
temporarily. On the second iteration each module already has a pointer to
another module, causing stuff to go into a loop.


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@419612 f38db490-d61c-443f-a65b-d21fe96a405b