Scavenging of halogen in recycling of halogen based polymer materials