update KMP and change name to indexOf()

@jakebiesinger @JavierJia @anbangx @Elmira88  separated KMP code and create a new branch for it.