Gitignore overhaul

An overhaul of the gitignore structure, refactoring out some gitignore files, while keeping the structure granular and as self-contained as possible.

Closes #2057.