Add clear_history command for SQL backend.