logentries_install.sh: Fix the system log issue. Add gentoo support.

* Fix the system log issue (Fedora 19, 20 also is supported).
* Add Gentoo support. 
* Some refactoring