autotools from gitsh

This PR actually is for multiple things:

* The `Makefile.am` from gitsh is brought in. This `Makefile.am` is based on the prior `Makefile.am` in rcm, but more well-written.
* The `Makefile.am` is abstracted to reduce coupling with the project name, etc.
* The Debian build is improved and added into the `Makefile.am`.