Bug: Cant update old revision rows

The storage class was performing its update query with the alphadecimal
id, and as such was only updating the cache and not the actual database.
We likely didn't notice this because nothing currently updates historical
revisions, but i'm working on a followup patch that adds a database row
and needs this update method to work.

This patch adds a test case to assert update uses the binary primary key
and fixes the broken line of code.

Change-Id: I103b9907bbc40e01eb2aabf638bc91567d0dc34a