[misc] Add missing @deprecated

(cherry picked from commit b7b3d1a07fc0693974d0b05fcb7761ffd880390b)
[performances] Add a bit of caching to XWikiDocument

(cherry picked from commit c5636c11add7f052ddf1859613014e80f9d6cb5a)

Conflicts:
	xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java