A huge fire has ripped through a favela in Brazil's most populous city, Sao Paulo, destroying hundreds of homes.