apparmor: move task related defines and fns to task.X files