Update Velocity and enable strict reference mode

This makes the velocity syntax more consistent with Gerrit itself, in
particular making it easier to find misspelled variables or other
mistakes in velocity templates.

Change-Id: I752ec1d70f659eac4955de5311343a1161bde507
diff --git a/github-plugin/pom.xml b/github-plugin/pom.xml
index f78b026..d6a84ef 100644
--- a/github-plugin/pom.xml
+++ b/github-plugin/pom.xml
@@ -156,7 +156,7 @@
     <dependency>
       <groupId>org.apache.velocity</groupId>
       <artifactId>velocity</artifactId>
-      <version>1.6.4</version>
+      <version>1.7</version>
     </dependency>
     <dependency>
       <groupId>org.apache.velocity</groupId>
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/PluginVelocityRuntimeProvider.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/PluginVelocityRuntimeProvider.java
index 6a97569..7741a88 100644
--- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/PluginVelocityRuntimeProvider.java
+++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/PluginVelocityRuntimeProvider.java
@@ -58,6 +58,7 @@
     p.setProperty(RuntimeConstants.VM_PERM_INLINE_LOCAL, "true");
     p.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
         Slf4jLogChute.class.getName());
+    p.setProperty(RuntimeConstants.RUNTIME_REFERENCES_STRICT, "true");
     p.setProperty("runtime.log.logsystem.log4j.category", "velocity");
 
     p.setProperty(VELOCITY_RESOURCE_LOADER, "file, class, jar");
diff --git a/github-plugin/src/main/resources/static/account.html b/github-plugin/src/main/resources/static/account.html
index 63dc6d9..f608cc8 100644
--- a/github-plugin/src/main/resources/static/account.html
+++ b/github-plugin/src/main/resources/static/account.html
@@ -24,7 +24,6 @@
                           <button type="submit" onclick="document.forms[0].submit()">
                               <span class="button green"><span>Next &gt;</span></span>
                           </button>
-                          <input type="hidden" name="next" value="$nextUrl" />
                         </div>
 					</div>
 				</div>
diff --git a/github-plugin/src/main/resources/static/pullrequests.html b/github-plugin/src/main/resources/static/pullrequests.html
index f8da4c1..991236b 100644
--- a/github-plugin/src/main/resources/static/pullrequests.html
+++ b/github-plugin/src/main/resources/static/pullrequests.html
@@ -23,7 +23,7 @@
                           </button>
                           <button type="submit" id="submit" disabled="disabled">
                               <span class="button green"><span>Import selected</span></span>
-                          </button> <input type="hidden" name="next" value="$nextUrl" />
+                          </button>
                         </div>
 					</div>
 				</div>
diff --git a/github-plugin/src/main/resources/static/repositories.html b/github-plugin/src/main/resources/static/repositories.html
index 7757149..7713950 100644
--- a/github-plugin/src/main/resources/static/repositories.html
+++ b/github-plugin/src/main/resources/static/repositories.html
@@ -24,7 +24,7 @@
                           </button>
                           <button type="submit" id="submit" disabled="disabled">
                               <span class="button green"><span>Accept &gt;</span></span>
-                          </button> <input type="hidden" name="next" value="$nextUrl" />
+                          </button>
                         </div>
 					</div>
 				</div>