Upsert tweaks.

- Refactor SqliteDb->getPKValue().
- Add a unit test for upserting a multi-column primary key.