Fixed storing foreign keys.
Changed indexing of Record.stored_values from name to object.
Added stored and committed record proxies.