Check req->trip_attributes before checking mask

Checking whether we have required req->trip_attributes at all, before checking the attributes of the trips is about 4% more efficient for journeys without specific trip attribute requirements. This is likely since lookup to trip_attributes for the trip is not very cache-efficient.