Rename primary to key & keys

Key properties are marked by setting `property.key = true` in orm2.
This change applies the same naming convention here.

Also, in certain places, `primary` was an array rather than a boolean property.
I renamed it to `keys` to make the code easier to read.