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

This patch adds a method that tells whether the previous upsert resulted in update or insert.