[cleanup] Improve codestyle
[refactoring] Use stream intead of byte array to manipulate attachment content
XWIKI-8689: Add Solr indexing daemon thread to handle the automatic indexing of documents as they are queued for indexing
* some refactoring