Proposed refactorings for shrinking algorithm

Extraction of some duplication to pursue readability.
`$giveUpAfter` should be removed as private attribute and `$attempts` should be added