Jos Buttler has announced he'll resign as England's white-ball captain after their Champions Trophy dead rubber against South Africa.