Adds a .gitignore.

Some of these folders are deliberately not tracked by version control
(here.) There are good reasons for such, but they clutter up the git
status view.