auto-include instances in <entry>

include all instances that are referenced
from an xpath within the referenced <detail>s
Merge pull request #3641 from dimagi/include-referenced-instances

auto-include instances in <entry>