Hundreds of asylum seekers and refugees were injured in more than 3,500 attacks on them and their shelters in Germany last year, officials in the country said.