Lego has won a landmark case in China against two companies that manufactured and sold toys almost identical to its LEGO Friends range.