Fix for Mantis #21051. Correctly handle specializations that occur during the specialization of methods.

cclasses.pas:
  + TFPHashList & TFPHashObjectList: add WhileEachCall methods that walk the list like ForEachCall does, but uses a while-loop instead of a for-loop
psub.pas, generate_specialization_procs:
  * use WhileEachCall instead of ForEachCall as new defs can be added during the specialization that need to be specialized as well

+ added test


git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@25577 3ad0048d-3df7-0310-abae-a5850022a9f2