Stop emitting the foreign key dance on data only changes

Unfortunately, we need to avoid the foreign key dance as much as possible as
it's very slow (full table copy) on MySQL 5.5.  As it's usually safe to do
so when only data rows are changing, we're doing that for the time being.
Merge pull request #297 from iarna/skip-foreign-key-dance

Stop emitting the foreign key dance on data only changes