Parameterize max errors for clear container

Also use setter injection for max request time.
Merge pull request #1476 from maginatics/clear-container-parameterize-max-errors-1.6.x

Parameterize max errors for clear container