Anheuser-Busch InBev has secured a deal with trade unions to end a blockade of its breweries in Belgium.