Fix scanner retry logic adding a call sequence

Taken from HBASE-5974 , 0.94 version
Limit the number of retries in case of timeout

Original commit taken from:

HBASE-7070 Scanner may retry forever after HBASE-5974