thp: add debug checks for mapcount related invariants