make <instance> always get inserted right after command_node

and sort instances by id
to normalize for tests
auto-include instances from assertions
require fixed ordering for Suite attributes
remove most explict <instance>s for basic modules

and fix test data to reflect sorted order of instances
check for xpaths in datum/@function as well
remove all unnecessary manual instance additions

and adjust tests accordingly

some test data was actually changed because instances were being added
over-eagerly
look for instances from within <stack> as well
make a special type XPathField for fields that contain xpaths

for a more declarative style, but it doesn't do anything functionally different
Merge branch 'master' into clean-up-instance-refs
fix test by not including unnecessary instance
Merge pull request #3656 from dimagi/clean-up-instance-refs

Auto-detect all standard instances in suite xml