Basicoperationservicecleanup

Fixes #1745 . Also a cleanup in the basicoperationservice implementation by moving out most of the threading to the basicoperationservicescheduler. Apart from that also some integration tests were written to test the priority operations since the initial bug is related to that functionality.