Cracker Barrel posted a quarterly loss and cut its full-year outlook as sales and traffic weakened, launching cost cuts amid a slow recovery.