Recursive filter_none in Inference Providers (#3178)
* Recursive filter_none in Inference Providers
* filter none values from messages as well
* update filter_none and add test cases
* don't drop empty dicts in list
* better typing and refactor logic into a list of comrpehension
---------
Co-authored-by: Celina Hanouti <hanouticelina@gmail.com>