The sight of drive-thru lines wrapped around the building—or even around the block—remains common, but restaurants are applying technology and new service models to combat the string of idling customers.