Improve compatability and ordering in the Makefile.

* Read the distribution name and version from META.json.
* New targets must be defined after `PGXS` is included.
* Add a `dist` target.
Ignore the distribution file.