Make poll period and timeout configurable.
Make poll period short for integration testing.
Merge pull request #364 from brendandburns/timeout

Make poll period and timeout configurable.