Add support for secondary entity keys

On SQL traditional databases these can create a UNIQUE constraint,
ensuring there aren't any duplicates.  In a pure b-tree sort of
implementation we might have to emulate these, or simply have a
query use "LIMIT 2" and fail if we get a second row.

Signed-off-by: Shawn O. Pearce <sop@google.com>
7 files changed