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.
Keep separate monitoring command from vanilla command.

This to allow the rewrite of the monitoring command line when resources
fail.
Increase resources requested when limits exceeded.

When a task fails because of resources limits, a new category of
resources is created, based on the original one, and increasing the
limits of the exceeded resource. This continues until dag_max_try is
reached. The original resource summary is moved to
rule-job-id.summary.failure.%d (thus if the task exceeds resources 10
times, but works at the 11th try, we have 11 such summaries).

Right now the increase is hardwired to double the original request.
Future improvements are to have some flexibility on how requested
resources are increased, and also have an upper limit on the resources
requested. The code could some cleaning too.
Include the all the limits set in the summary

The limits set are printed in the summary with the prefix "limits_".
This can be used to record what resources where requested, from which we
can compute an estimate of resources wasted.