Added main searching code

The search is performed by repeatedly adding [combinator, program] pairs to a list, applying a rewrite to each pair in the list, processing the pairs which cannot be rewritten, and removing the processed pairs from the list.