Daimler has guaranteed the jobs of 37,000 workers at its Singelfingen factory in south-west Germany until 2020 and said it will create about 2,000 new posts.