Add license, structure for building and packaging

Big changes. The main functions of the program were moved into a
separate module. Files were put in directory structures for use with
Module::Build. The GPLv3 was put into the repository in the COPYING
file, as well as license notices in each source file.