Fix targetRelation initializiation in prepsecurity
Fix targetRelation initializiation in prepsecurity

In 6f9bd50eabb0a4960e94c83dac8855771c9f340d, we modified
expand_security_quals() to tell expand_security_qual() about when the
current RTE was the targetRelation.  Unfortunately, that commit
initialized the targetRelation variable used outside of the loop over
the RTEs instead of at the start of it.

This patch moves the variable and the initialization of it into the
loop, where it should have been to begin with.

Pointed out by Dean Rasheed.

Back-patch to 9.4 as the original commit was.

50wu/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,xinzweb/gpdb,jmcatamney/gpdb,lisakowen/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,ashwinstar/gpdb,adam8157/gpdb,jmcatamney/gpdb,adam8157/gpdb,50wu/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,lisakowen/gpdb,lisakowen/gpdb,ashwinstar/gpdb,50wu/gpdb,adam8157/gpdb,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,greenplum-db/gpdb,lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,xinzweb/gpdb,ashwinstar/gpdb,xinzweb/gpdb,adam8157/gpdb,adam8157/gpdb,adam8157/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,xinzweb/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,lisakowen/gpdb,adam8157/gpdb,greenplum-db/gpdb,50wu/gpdb