fix handling of poll event bitmask
refactor minecraft-ctl and implement --check-server