tests: misc-concurrent-io: refactor code and add new tests