Added tests for new DatabaseBase::upsert

Follow up Id7fc6652
Pass function name to begin/rollback/commit
Use __METHOD__ as default param (see I86cbdeab)

Change-Id: I9eb326c035d4a604db5b3492f090d8dd9d21c920