Make Python .gitignore entries that correspond to directories match only directories.

This commit also alphabetizes the distribution/packaging section after separating
the directory entries from the file entries.  I left alone a few entries that
may or may not be directories (e.g. *.egg and the "Mr Developer" section).