libmultipath: remove max_fds code duplication