Update .gitignore to ignore all target-like dirs.

I also sorted lines in .gitignore. The file might include some obsoleted lines but I left.
Sure.