Limit memory for staging tasks

Also, in advertise messages, when reporting available memory,
take staging tasks into account. [#46942663]