Officials in Johannesburg say many of the victims had lost their homes — and had taken shelter in the high-rise.