Properly separate tasks in install.escript

This splits the operations of figuring out the environment, adding
group_history to the module list of the kernel app file, and actually
installing the erlang-history modules

Also adds a bit of logging for some backups, and fixes comments.