The deal provides cash to Rivian and is part of Uber’s attempts to stay relevant in a driverless future.