P-multigrid preconditioners applied to high-order DG and HDG discretizations