rewrite the ffi tutorial with snappy as an example

The example with OpenSSL is incorrect, because OpenSSL is using a
static variable for the return value and isn't thread-safe.