Add .gitignore file

When you want to see 'git status' including ignored files run:

  git status --ignored

(cherry picked from commit 62f4f85f7caaa36a2882994d544c30179374b96e)
Add doxygen doc and java output to gitignore file

(cherry picked from commit 85efb54fb7f5e036a0017bb10f9bd4b965061901)