Add a timeout method applying to the whole session

Provides a solution for the issue #83115 on the rt.cpan.org tracker (https://rt.cpan.org/Public/Bug/Display.html?id=83115).