Clean up .gitignore files.

Reorder entries, add new files generated by automake / libtool and
split up for each subdirectory.