loplugin:staticcall

Change-Id: I1d428ccd434b7b6f61461ea29447291759c3a7bf
(cherry picked from commit 732e7bdfa2d0e7b0296599517f53d194c02acfee)
css::uno::Reference::query does not have side effects

partial cherry-pick of c6eb208473109234886600ac299f0cc75ee94e9c "loplugin:staticcall"

Change-Id: Icb2ee78db94ba3a87a5c8ff35d72d191f01d4900
SAL_WARN_UNUSED_RESULT for static Reference::query function

...which the recent loplugin:staticcall changes showed was occasionally used
apparently under the assumption that it was non-static and changed the object
it was called on.

(cherry picked from commit 7242fe6e3360843f9ef5ce07b447de729323a3c8)

Conflicts:
	include/com/sun/star/uno/Reference.h
	svtools/source/uno/treecontrolpeer.cxx

Change-Id: I989a2a4ed3886d7f370855c9e8c1867e646c059b