Create KMP.java

Implementation of the KMP algorithm