Shortened wait timeouts, fixed test deadlock, add Cursor locks, misc cleanup