Move the repository addition in a pre-install.d script, as that is the
right place for such operations (no more need to manual `apt-get update`
run), and switch it from curl to wget (already in use in that script);
as a result, wget is now installed in pre-install.d.
The above change makes the installation of hadoop-hdfs-namenode and
hadoop-hdfs-datanode possible using the declarative package-installs
way.
As a side effect of installing packages before setting up the hadoop
user and group, make sure to not create them if already present. The
packaging as of today takes care of creating the hadoop group, so guard
the setup in case it is not done anymore or will be done for the user
too.
Change-Id: I248872e77358f8388f4a66a54e53b2ffa727c7e3