Fix DBWorkflow index desyncing on Pipeline#clear()
Fix DBWorkflow index desyncing on Pipeline#clear()

Use db_delete_object() instead of calling
db_delete_{connection,module}() directly.

Also fix iterating on changing list.

minesense/VisTrails,minesense/VisTrails,minesense/VisTrails,minesense/VisTrails,minesense/VisTrails