Several fixes to array handling in ecpg.

Patches by Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>

Conflicts:
	src/interfaces/ecpg/test/expected/preproc-outofscope.c