The New Zealand Rugby Union has ended a two-decade long commercial relationship with Coca-Cola by signing a deal with Pepsi.