SSP-2681 Compensate for null PK vals in upsert statements

Upsert SQL statements were building PK matching credentials using
simple equality expressions (source.key = target.key). This doesn't
work if our PKs now allow nulls b/c you'll never match a row
where both source.key and target.key are null. So this patch
changes the predicate to (source.key = target.key or
source.key is null and target.key is null).

There *is* an edge case that we can't deal with right now where if
you have a table with no physical PK *and* no NOT NULL columns, empty
rows will always be handled as inserts on Postgres. We do not have
such a table currently and hopefully will never have such a table.

This patch also completely eliminates checking of external_* tables
for primary keys. Now both "raw" validation and upsert processors
rely exclusively on stg_* tables.

This patch also fixes a bug where the 'batch_id' column was being
included in synthetic primary keys derived from stg_* tables.