pidl: Remove "max" and make "range" smarter about unsigned types