Improve compatability and ordering in the Makefile.

* New targets must be defined after `PGXS` is included.
* Add a `dist` target and ignore the resulting file.