Fixed hash string writer, added more options

The location hash string function did not take into account empty
strings. Now it uses an array system to write the hash. Two new options:
saveToHash and closeOnOpen. Setting the first to false disables hash
values in window.location. The second option sets what to do when
opening sibling drop downs.