Refactored cache

Allows disabling by setting $.pjax.maxCacheLength = 0
Fixes issue #165