Who replaced Derby when he resigned in 1868?