Introduce structure "lightrec_state" and use it in a global variable

This also fixes the "register_cache" symbol resolving as external.
Pass a pointer to the lightrec_state structure to blocks

The pointer is passedd using the last callee-saved register that
Lightning provides.
regcache: Use offsets from the state structure to load/store registers