Use hooks to attach search in hack

Summary: This adds parsing hooks to make it so parsing doesn't need to depend on search.

Then, moved search to it's own folder/'package'.

Reviewed By: @jwatzman

Differential Revision: D1484661