feat(SearchDoc): Validate "fromid" property in getQueries() method (refs #4935)

If the "fromid" property is not a valid "fromid", then getQueries()
returns bool(false) in order to not perform a search on docread.

The return value for onlycount() has been changed to return -1 when the
query cannot be performed.

Therefore, possible values for onlyCount() are:
- N>0: non-empty result's set
- N=0: empty result's set
- N=-1: when the query cannot be composed or performed