Ensure pjax.state is consistent before pjax:beforeReplace event
Add previous state to beforeReplace event
Move state and previousState to event props
Fix previousState scope to success closure
Merge pull request #403 from defunkt/before-replace-event-tweaks

Before replace event tweaks