[DBAgent] Add a new virtual method: lastUpsertDidUpdate().

This patch adds a method that tells whether the previous upsert resulted in update or insert.
> Don't we have to consider the "numAffectedRows == 0" case at HATOHOL_ASSERT()?

I confirmed that numAffectedRows becomes 0 when a record is updated by the same data.
We should care this case.

I wrote a test for it.
I'll push it to this branch.