Use upsert 2

These patches clean up DBClientHatohol by using upsert feature of insert(),
which is recently introduced.