refactored timeout-stub handling code:
* extracted some functions into separate helper class
* removed code duplication
* added comments
* changed default stub to the pretty animated loader gif