Format .gitignore file with github heuristics

This commit updates the .gitignore file to include headers for
readabiliy and to exclude temp files and logs.