Split emamux-rt:select-engine into more clear little functions.