Adds resource category parents.

When limits are exceeded, the future plan is to create a new resource
category with new bounds on the resources. This commits adds the parent
field to keep track from where a category was created, together with a
function to copy resources between parent and child.