 Fix for #18178 and #18187 by changing the concat of empty RangeIndex 
The `_concat_rangeindex_same_dtype` function now keeps track of the last non-empty `RangeIndex` to extract the new stop value.

This fixes two issues with concatenating non-empty and empty `DataFrames` and `Series`.

Two regression tests were added as well.

- closes #18178 and closes #18187 
- 2 regression tests added
- Submission passes `git diff master -u -- "*.py" | flake8 --diff`
- 1 whatsnew entry
