Daniil Medvedev becomes the first player since 1981 to reach a fifth consecutive ATP final after beating Karen Khachanov in the Miami semi-finals.