Burger King’s parent company, Restaurant Brands International, has agreed to a deal to buy Firehouse Subs for about $1 billion, company officials announced Monday.