Search algorithm

Added pattern matching kernel which will form the base for most of the search algorithms. Also added ```search``` algorithm and test.