Added experimental pjax support.

Also cleaned up the javascript directory to be more uniform. Our own
javascript goes into js/custom while all 3rd party libraries go into
js/lib.

[ci skip]