Allow caller to specify maxResults in FullSearchTask

Also fix the related tests.

Change-Id: Ic887b9acd041284c80c279f5cb5c7a05f11f3024