Update to data handling code

This does some updates to various data-handling code in LensKit:

- Decouple public API of rating packing from internal format
- Improve testing of rating packing
- Automatically sort packed ratings by timestamp when needed (#538)