Add kernel for pattern matching

Finds all matches. Can tell if there is a match starting at  a
particular index.
Search algorithm

Add algorithm and test for search()
Minor fixes

Change documentation style, add test for search(), remove unused
variable, remove trailing whitespaces
Merge pull request #103 from roshanr95/search_algorithms

Search algorithm