x86, mce, cmci: factor out threshold interrupt handler