change milkcat_cursor_t in API, support for automatic release.