QCD topology at finite temperature: Statistical mechanics of self-dual dyons