A major cleanup of RMF backend code

This cleanup
- removes (hopefully) unused functions
- adds type checking in the backends
- adds type checking on frames

It sets the stage for restructuring the backends so that reads and writes are done a frame at a time and all other accesses to the data are accessing a standard, in memory layout (and so don't need virtual function calls).