Update install-p4-tools.sh to use P4Runtime v1.0

Includes also various improvements to the p4vm scripts, such as:
- Choose to build VM with Ubuntu 16.04 or 18.04 (experimental)
- Allow users to specify version of protobuf and grpc to use
- Avoid building protobuf and grpc if already installed in the system
- Install Bazel 0.22

Also:
- Remove check for invalid group member weights (now PI always returns
members with weight 1)
- Re-compiled all P4 programs and fixed missing padding in controller
packet headers

Change-Id: I0e672fcebbaba63354c749f0c774af251f3cbc6c
diff --git a/tools/dev/p4vm/Vagrantfile b/tools/dev/p4vm/Vagrantfile
index cd4c8c3..a7bb9bf 100644
--- a/tools/dev/p4vm/Vagrantfile
+++ b/tools/dev/p4vm/Vagrantfile
@@ -1,13 +1,14 @@
 P4_VM_TYPE = ENV['P4_VM_TYPE'] || "dev"
+P4_VM_UBUNTU_VERSION = ENV['P4_VM_UBUNTU_VERSION'] || "16.04"
 
 Vagrant.configure(2) do |config|
   if P4_VM_TYPE == "tutorial"
-    config.vm.box = "lasp/ubuntu16.04-desktop"
+    config.vm.box = "lasp/ubuntu" + P4_VM_UBUNTU_VERSION + "-desktop"
   else
-    config.vm.box = "bento/ubuntu-16.04"
+    config.vm.box = "bento/ubuntu-" + P4_VM_UBUNTU_VERSION
   end
   config.vm.provider "virtualbox" do |vb|
-    vb.name = "ONOS+P4 " + P4_VM_TYPE + " " + Time.now.strftime("(%Y-%m-%d)")
+    vb.name = "ONOS+P4 " + P4_VM_TYPE + " " + P4_VM_UBUNTU_VERSION + " " + Time.now.strftime("(%Y-%m-%d)")
     vb.gui = true
     vb.cpus = P4_VM_TYPE == "tutorial" ? 4 : 2
     vb.memory = 4096