Elena Rybakina beat Aryna Sabalenka to win the WTA Finals to complete a season of near misses for the world No 1.