Georgian Nikoloz Basilashvili has stunned Juan Martin del Potro to win the China Open final.