On the Time Required to Detect Cycles and Connectivity in Directed Graphs