Fixes to DB triggers, and add indexes

Add missing intermediate table deletion to delete trigger.
Add missing WHERE clause to insert in trigger.
Add indexes.
Does this needs to be added to the truncate_gtfs.sql script as well?