Waste pre-treatment by pyrolysis, gasification or cracking