Previously, there was a race condition in Trie#parseText since
it called constructFailureStates on first run without synchronization.
See https://github.com/robert-bor/aho-corasick/issues/16
This commit fixes this by using the builder pattern in order to
create a fully initialized Trie.
N.B. This changes the API