tools: fixed command line parser setup

The previous command line parser setup caused the rewrite of the
database connection parameters read from .pgpass with the hardcoded
defaults each time the command line was parsed.
This caused a failure while collecting PostgreSQL database
configuration when using a remote setup

Now the script check if we have root permission, then read .pgpass
setting the default values for the command line parser.

In order to figure out what was happening, I added some logging
to the __main__ module and to the posgresql sos plugin.

Change-Id: I284554888143ad27bca0630cdbc26e91cf735ab9
Bug-Url: https://bugzilla.redhat.com/885421
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>