regcache: Use value -1 to differenciate unmapped registers and $zero
Apply the offset prior to translating I/O addresses

This avoids segfaults when the register points to an area outside a
memory map, even though the I/O operation is valid once the offset is
applied.

This is done by adding the offset to the address to translate, and then
substracting it from the translated address. Then the address returned
in the temporary register can be used for different offsets as well.