Factor out a class for efficient regex search over lists

RegexPathPredicate had some clever logic for avoiding matching regular
expressions over an entire search list when we can identify a common
prefix that all matching results must have. Factor this out into a new
class, RegexListSearcher, add tests, and use it from ListProjects.

Change-Id: Ie08ad8dcf09708a8aa3efcfbed6c4ee6879f80c7
4 files changed