Add group model for grouping jobs, slumber operation for that model

Group model follow 2 rules
1. can't add new group with the same reference if another group with same reference has unexecuted jobs.
 2. can't add jobs to a group if there is old group with same reference with executed jobs