Optimal Content Downloading in Vehicular Networks