Support setting shard timeout

Closes #528
Merge changes.txt conflict