BUG: value_counts can handle the case even with empty groups (#28479)
* If applying rep to recons_labels go fail, use ids which has no
  consecutive duplicates instead. 

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

xuancong84 found that value_counts() crashes if `groupby` object contains empty groups.
However, even though I made the construction of DataFrame don't skip empty rows, it still crashed.
Till then, I already tried in many ways though, in this time I tried to correct the callee `self.grouper.recons_labels`. After several tests, I found that If freq of `Grouper` is too long so that it has empty groups in some periods then it crashes. And also have found that this is solved by using `ids` which has no consecutive duplicates instead of `self.grouper.recons_labels`.
Hello @0xF4D3C0D3! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:



* In the file [`pandas/tests/groupby/test_value_counts.py`](https://github.com/pandas-dev/pandas/blob/15635d4e1cc6e36f052ba5d614fe657da03785f7/pandas/tests/groupby/test_value_counts.py):

> [Line 83:1](https://github.com/pandas-dev/pandas/blob/15635d4e1cc6e36f052ba5d614fe657da03785f7/pandas/tests/groupby/test_value_counts.py#L83): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1
> [Line 106:1](https://github.com/pandas-dev/pandas/blob/15635d4e1cc6e36f052ba5d614fe657da03785f7/pandas/tests/groupby/test_value_counts.py#L106): [W391](https://duckduckgo.com/?q=pep8%20W391) blank line at end of file

 I'm sorry. I'll issue PR later again because I made some mistakes 