(bug 49263) Validate all Snaks passed to the API.

This enforces constraints on the Snak's data types.

This should prevent invalid Snaks to be created
and stored in the database.

Change-Id: I67b9ae480c4a667043486b45027796c0c69c5ffa