Add .gitignore to ignore auto-generated files.

Add .gitignore that ignores files generated by the build, file backups (ending with "~") and files that are auto-generated by Eclipse. This makes it so each commit only changes meaningful files.