Parameterise circuit breaker error threshold and reset timeout

CC @gklopper 

I'll make a separate pull request to `platform` to set the error threshold appropriately.