This commit implements a massive refactor of the repository, and
moves the build system over to use Mage (magefile.org) which should
allow seamless building across multiple platforms.
Revamp the build system to be more inline with other Prometheus exporters.
Notably add Darwin and Windows build targets, and add support for releases
using tar files.
In PostgreSQL, views run as the defining user, meaning you don't
need a view wrapping a function (you can just have a view). This
improves readability, maintainability, performance, and clarity.
If the deployer role is not superuser (which is the case in AWS RDS,
for example), we need to grant it access to postgres_exporter role
before we can create a schema with AUTHORIZATION postgres_exporter.
Added metrics for locks per database per mode, pg_stat_activity, pg_stat_replication.
Updated README.md with possible solution for running as non-superuser.
This is based on the mysqld_exporter, but drastically changes how metrics are
discovered and enumerated since postgres already very closely follows the
Prometheus format.