UN says record half a million Afghans displaced by war