[scala] Add withParameters() support for sinks/sources