Thousands of slum dwellers in Manila have lost their homes after a fire raged overnight.