Tasks stop on unmanaged

stop tasks when entities are unmanaged, and better bookkeeping for scheduled tasks.
(also fixes eclipse IDE problems caused by checkstyle.)
i think you're right, we should preserve the `ManagementTransitionMode` and do the `setParent` call accordingly