Issue #328: Provide a way to get the last inserted ID from db_merge().

PR for https://github.com/backdrop/backdrop-issues/issues/328.