fixed some issues reported by valgrind

notably some leaks due to not handling properly some fault paths (edge cases)

and invalid leaks happening in some cases during the exit phase
(because of the io muxbeing destroyed early in stop_serving() while some workers were
 still running and didn't know what to do with the connection context since it used to
 be released by the iomux using the eof callback)