make REPLACE INTO statement possible

REPLACE INTO statement could come in handy sometimes, as well as INSERT IGNORE.

this patch will make db.insert possible to handle these statements.