after-merge: simplify, fix a bug
after-merge: simplify, fix a bug

* simplify the code at default: label
* bugfix: flush the checksum for NULL fields
  (perfschema.checksum was failing)
* cleanup: put repeated code into a function

natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2