Simplify .gitignore files

It's a bit confusing to have .gitignore files spread all over the
filesystem. This commit tries to consolidate those into one .gitignore
file per component. Moreover, we try to describe files to be ignored which
happen to have a common identifying pattern by glob patterns.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>