Replaced magic numbers with constants.

This speeds up unit tests by 0.2 seconds, since NO_ENTRIES_SLEEP_INTERVAL can be set to 0 for unit testing.

Also, unit tests set the reader's chunk size now to the expected value where relevant, to ensure the tests test what they are supposed to tests even if the default chunk size changes.