Consolidate task life

Fix for #394.

Fix resources leak by not let labeled/unlabeled to mix, and by adding functions to gather all resource accounting.