cleanup: some old unused vars removed, purge and syncdb now use show schemas (instead of show databases) for postgresql compatibility, added additional handling for no_username auth