[trainer] support UserDict inputs (torch-nightly)
torch-nightly has changed the behavior of DataLoader. Until now its iterator was returning a `dict` structure, but with pt-11 it now returns our custom `BatchEncoding` dict structure, which broke `_prepare_inputs` in Trainer as it misses the `dict` check.

This PR fixes the problem switching to checking if it's any kind of dict structure via Mappings and removes `**` as dict can be init'ed with any type of dict. (`**dict` breaks with `UserDict`)

Thanks to @sgugger for helping me to fix this one.

@sgugger 