Hundreds of thousands of displaced Palestinians are expected to return to ruined homes in Gaza where tents are being pitched amid widespread devastation.