(PUP-1852) Deprecate the 'search' function.

This function is deprecated because support for dynamic scoping
has been removed in general and this function makes it possible
to abuse the systems ability to search multiple disjunct name-spaces.
Merge pull request #2750 from hlindberg/PUP-1852_deprecate-search-function

(PUP-1852) Deprecate the 'search' function.