Thousands of displaced Palestinians trekked over the wastelands of Gaza to return to the ruins of their abandoned homes after a ceasefire took effect.