(#22142) Ensure that :datadir is a String

The previous behavior of the datadir configuration for some backends
allowed it to be an array, but didn't truly handle that case. It worked
because File.join flattens arrays before joining with the file separator.
However the interpolation of variables was not done on array contents.
This lead to users thinking that the datadir was going to be interpolated,
when in fact it wasn't. Instead of trying to cater for these misconfigured
hiera setups, we now raise an error explaining the problem.