Define a pctrie iterator type and methods for starting and continuing a walk through elements of a pctrie, forward or backward, skipping the empty buckets or stopping at each of them, with bounds available to stop a search for an out-of-bounds item before the search completes. Apply it to pctries in swap_pager.c and subr_rangeset.c, and by extension to some pmap searches.