add AgaviArrayPathDefinition::flatten() method
closes #1042