Refactor partial cusparse bindings to use cffi.