improve result handling

now using shared_ptr instead of raw pointer
also re-added result(set) storage, which is now working globally (not per-connection-handle like previously)
remove native 'cache_get_data'
add natives for handling multiple results

fixes #39
return 0 instead of -1 in cache_get*_count natives

if a user uses a _count native in a for-loop, returning -1 would be a mess (infinite loop)