(TK-130) Renamed function for clarity
(TK-130) Fixed algo to match Jetty's internal one
(TK-130) Add test for number of selectors per core