idr: implement idr_preload[_end]() and idr_alloc()