Distributed Scheduling for Time-Critical Tasks in a Two-Layer Vehicular Fog Computing Architecture