Don't use hardcoded timeout value in batch mode.

Use timeout given in configuration when gathering minions in batch mode.
Add option to mock test.
Merge pull request #16785 from bahadir/add-batch-timeout

Don't use hardcoded timeout value in batch mode.