Add error message when a table has no primary key.

If we don't have a primary key we cannot safely insert/update records.

Refs #3950