The privately held online grocer is building a retail media network that balances member experience with ad revenue.