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

This patch adds a method that tells whether the previous upsert resulted in update or insert.
Memo:

http://dev.mysql.com/doc/refman/5.6/en/mysql-affected-rows.html
```
For INSERT ... ON DUPLICATE KEY UPDATE statements, the affected-rows value per row is 1
if the row is inserted as a new row, 2 if an existing row is updated, and 0 if an existing row is set
to its current values. If you specify the CLIENT_FOUND_ROWS flag, the affected-rows value is
1 (not 0) if an existing row is set to its current values. 
```