Add support for C bindings to the compaction V2 filter mechanism.

Test Plan: make c_test && ./c_test

Some fixes after merge.