Implement Cookbook#deprecate_search

Move the logic from the CookbooksController#deprecate_search into an instance
method on Cookbook.