Parameterize max errors for clear container

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

Parameterize max errors for clear container