Optimal Parallel Algorithms for Periods, Palindromes and Squares (Preliminary Version)