Tens of thousands of forcibly displaced Palestinians have been returning on foot to north Gaza.