base: API for hash tracking and setting.

Also, move the old cockpit.location temporarily out of the way.
shell: Use new API for hash tracking and setting.