Method to completely replace location.hash is added

It is currently impossible to completely replace value of location.hash.
The patch adds this functionality