On the Statistical Query Complexity of Learning Semiautomata: a Random Walk Approach