JSON.parse in applyState if the state is a string (as it is for the init.ial request load if not using fragment urls)

This fixes a long-standing bug on our install where non-fragment-url-loaded requests were getting a JavaScript error.