fix storeState and getIdByUrl for Safari 5.0.x
fix storeState and getIdByUrl for Safari 5.0.x

History.storeState was only updating the urlToId mapping when new states
were stored during the session, and then updating the idToState and
stateToId mappings on unload, so when the safariStatePoll attempted
to check if the current state was the lastSavedState, that function's
dependency on extractState would fail as it was using the idToState
mapping.

drd/history.js,drd/history.js