Fix a couple of Ajax related path issues

  - Include context path when generating page specific JS
  - Include context path when making Ajax requests
  - Fix Ajax path matching (previously renderVersion was being set to
    "ajax")
why not calling it `contextPath` if this is what we are really using here, when I first read the changes, I thought `ajaxServer` was a variable holding a hostname of a separate server that knew how to handle ajax calls.