A 26-year-old man has turned himself in to the German police, claiming to be responsible for a deadly knife attack in Solingen.