[Chronik] Add compress_script_variant to compress script variants
Summary:
Mirrors ScriptCompression in /src/compressor.h.
Having a Rust variant of this function allows us to avoid costly FFI bridging, which gets relevant in hot loops.
Test Plan: ninja check-crates
Reviewers: Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D14426