Add apt-get update, sudo -c, and users to scripts

For cloud installs apt-get update needs to be ran before we install git,
build-essentials, etc.

Change certain programs to run with sudo -c so the commands are ran with
a correct user

Add ubuntu and root users to the foia group so cloud installs work.

Change-Id: Ide4aaa433eace00bdcccfbfc7fe03493069f91eb