Modified jsglue so that it does not suffer from abi incompatibilities

Convert from jsval to uint64_t and vice versa.

Rust expected uint64_t while C side code uses jsval(64bit union type) but this kind of conversion is incompatible on some platform ABIs (like ARM EABI).  So I added converting code that performs the converting safely.