WIKI-741 Improve the performance of PageImpl.getAttachmentsExcludeContent()

Fix description:
* Get attachments by query
* Cache the number of page attachments
Merge commit '41e564425e598ba49f49f20a008c8ca9f6b63a27' into HEAD