Changed entity key generation to use random bytes via FFI
Garbage collect old (replaced) entities after time specified by config value
Fixed bad FFI code for random key generation. Ensure we read buffers even when just proxying without saving.