convert package names into valid puppet variables

RPM and Debian packages may contain characters which are not valid
as variable names in puppet. Catch and convert these into '_', which
is safe. Currently this is a one-way transformation: it would be nice
if it were reversible.

Additionally, on Debian-based systems that support multiarch, package
names may be suffixed with :archname. Strip that off.
Merge remote-tracking branch 'jmtd/master'