Rising homelessness in Sheffield cost the city council nearly £8 million in temporary accommodation costs in the last year.