Use mw.template.compile for compiling in View.js test
Update tests to avoid deprecation warnings

Change-Id: Ic3ed72ae1ee3393b6eddf8ce2e3bef24d2913e71