Finish simplified automata by myself.
Supplement the destructor & improve code style in KMPImpl.cpp