A huge fire has destroyed hundreds of shanty homes at a Philippine port, leaving thousands of residents homeless.