Expose `cache` over the FFI.
Expose `cache` over the FFI.

This exposes an FFI function for each direction of caching, `Forward`, `Reverse` and `Both`. This is to make is as clear as possible to consumers which direction they are caching their attributes in. The original implementation exposed the `CacheDirection` enum over FFI and it made mistakes very easy to make. This is more explicit and therefore less prone to error.

ncalexan/mentat,ncalexan/mentat,ncalexan/mentat,ncalexan/mentat,ncalexan/datomish,ncalexan/mentat,mozilla/mentat,ncalexan/datomish,mozilla/mentat,mozilla/mentat,mozilla/mentat,mozilla/mentat,mozilla/mentat,ncalexan/mentat