Fix unused parameter warnings
Move refcnt assertion to PivotElement

This also fixes the tautologic >= 0 on an unsigned type.
Set methods and fields const in PivotElement
Const correctness