[BUG] Improved handling of ill-definded problems in coinfidence.py

Returns now inf if no limit can be found.