Add type validation to the primary hash and range key

This change adds the type validation for the primary key, including
both the hash and range keys, Since the primary hash and range keys
only support scalar types, which are number, string and binary.

Closes-Bug: #1378820

Change-Id: I86bda5378208d340b4cb12d5c0ddb9b5bf2face1
Merge "Add type validation to the primary hash and range key"