XWIKI-9309: Also search in attachments when type is DOCUMENT
* Use dedicated search fields based on the selected search results type.
* Displays dedicated search fields for attachments.

(cherry picked from commit f8037ea24db48880a36923c97768246c88855a40)