Elaborate ffi module interface, make FFI func prepare be method of lib object.

Now there's lib.func(rettype, name, [argtype]), i.e. explicit ffi.sym() call is
not needed.
Implement support for variables. var = lib.var(type, name); var.get()
Cleanup.
ffi: Update tests for latest API.