Issue #2635584 by hussainweb, alexpott: Move core/.gitignore policies to composer events/packaging scripts