Added library for hashing.

Will be needed for deamortising KMP.
KMP is now deamortised.

Done using Simon's Algorithm.