Update Aho-Corasick.cpp

changing CreateTrie from void to int and provided error check.