Fix RefOrTagged::get_as_int()
Fix RefOrTagged::get_as_int()

Revert back to original implementation. It was probably modyfied by
a mistake.

Change-Id: I3896dc2b379890575a1e234803db30f0cda021f9

realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core