Update git ignores and excludes

Move some of the repository-wide excludes from .git/info/excludes to
.gitignore so that they will be ignored for everyone involved in the
project.

Also remove the PhpStorm .idea directory from the excludes, with the
exception of .idea/tasks.xml, .idea/workspace.xml and
.idea/dictionaries/Greg.xml