Difference between coinbaseaux.flags vs. coinbasetxn.data?
When the mutation "coinbase" (see BIP 23) is present, the key "coinbaseaux" sets rules for what MUST be in a coinbase if/when one is built/modified. 

The key "coinbasetxn" is optional, and if omitted the mutation "coinbase" is assumed and the implication is that "coinbaseaux" MAY define requirements for building the coinbase.

The key "coinbaseaux" is also optional, however its omission has no implications according to BIP 23.