Workaround a trailing comma problem on pg version

The postgresql version can be reported with a trailing comma on some platforms
(e.g. Windows). This will make sure that the version check is compatible.

This was suggested by "Eduardo Henrique Teixeira <ehstbr@gmail.com>"
on stoq-users mailing list.

Change-Id: Ifdb3287adafe353e3b1bf332407ea91f3c2248a3