resource: add helpers for fetching rlimits