Added KMPSearcher and used it to implement indexOf to fix bug with patterns with repeated prefixes