Calculus of Dini subdifferentials of functions and contingent coderivatives of set-valued maps