ctdbd_conn: Adapt loop counter's type to the loop limit