make test not depend on order

`NestedThroughAssociationsTest` adds records to `member_details` table.
When test performs `@member_details[0]` then the order of record
is not guaranteed. Hence it is best to start with a clean slate by
deleting unwanted records.
Merge pull request #11638 from neerajdotname/make_order_independent_association_test

make test not depend on order