BUG: fix datetimes.should_cache() error for deque (GH 29403)
`itertools.islice()` should be used to get slice of a deque. `itertools.islice()` also can be used (and is efficient) for other collections. So `unique(arg[:check_count])` was replaced with `set(islice(arg, check_count))` which is also much faster on test data. 

- [x] closes #29403
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Hello @nathalier! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:





There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2019-12-14 16:01:44 UTC pls run `black pandas/tests/indexes/datetimes/test_tools.py` and `isort pandas/tests/indexes/datetimes/test_tools.py` > pls run `black pandas/tests/indexes/datetimes/test_tools.py` and `isort pandas/tests/indexes/datetimes/test_tools.py`

@jbrockmendel Thanks a lot for help!


 @jreback Now it's green, but possibly some of added tests are redundant. thanks @nathalier 