More than 300 schoolboys kidnapped last week in an attack on their school in northwest Nigeria have returned home.