Inuse in use

Instead of *_allocated, use local_resources->*.inuse.

*inuse are counted in place, rather than adding and subtracting every time something happens to a task.