Building a Thornmail is almost never advisable, even to counter a Master Yi. In the game shown, where hattez was so far ahead, I'd still not build a Thornmail. It gives more defense than is necessary, and it provides no health. Meanwhile, Master Yi's 80+ true damage per hit basically negates any Thornmail damage he'd receive.
Overall, a much better item to counter is Randuin's, which is such a good item that every bruiser/tank should almost always have one. It provides a ton of armor, but it also offers health to make that armor more worthwhile. Realistically, once you reach 150-200 armor, building more is a waste of gold; at that point, though, health is now worth about twice as much as armor. That's why Randuin's is so nice: it gets you near the armor cap, and gives a ton of HP as well. Plus, slowing Yi's ASP by 20% means you're literally reducing his damage output by 20%. Thornmail might hurt Master Yi, but it won't be for long. With his Q burst and true damage, I'd reckon he'd do less than half damage to you in the form of auto attacks, meaning he'd likely only take 200-400 damage before you blow up.
Strategically, though, countering Yi is easy. Ward and lane smart so that he can't pull off ganks, and know that Yi blows up almost as fast as he makes other people blow up. If you can, don't initiate a fight until you know Yi is contained (i.e., he's visible to you) and focus your initial CC burst on him. Within 2 seconds, your mid should have blown him up and it's now a 4v5 with 500 extra gold on your team.