Refactor Rec's loop_mask to LHCbKernel's traits
The loop_mask
function inside of Rec's functorcore was being used also in SelKernel, creating a circular dependence. This was not a showstopper as these are header-only libraries, but it became annoying when trying to add a new library. To remove this circular dependence, the function is put into LHCb kernel instead.
Goes together with Rec!3995 (merged)