Thousands of Palestinians have returned to northern Gaza after Israeli troops withdrew, following a ceasefire agreement.