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")

fixes #1591 
I really dislike the idea of exposing this to the client as `contextPath`. For one thing, I can see it being something that the person running the server doesn't want exposed. Instead, I think we should incorporate `contextPath` into the `liftPath` we send to the client 8 lines up. What do you think?