AG Barr has expanded its sporting tie-ups with a deal to sponsor Scottish rugby.