Add get/set functions to urlState

This adds the ability to stick arbitrary pieces of state information in
the URL.
Merge pull request #1701 from kdeloach/topic/urlstate-generic

Add get/set functions to urlState