Copies the exit region code into `on_team_end`.
Copies the exit region code into `on_team_end`.

This addresses the issue that some regions are never left by the main thread so the decision about deletion has never been made before. In addition this includes some minor fixes (e.g. float handling) in that code.

rschoene/scorep_substrates_dynamic_filtering,Ferruck/scorep_substrates_dynamic_filtering