Resolves: fdo#86449 backport rtf fixes

empty Reference

valgrind + bff

(cherry picked from commit 0a42632a74596cbc781746931bf8f2650994b80f)

empty m_aStates

valgrind + bff

(cherry picked from commit e3247719911f4e9b61ec43ea1c9ce04bcddc4ff8)

Change-Id: Id3c039a46dec5d2d4a4642dfb53d23a76972dde2
3bd526b7ebf0f4fce5d0c7054809e0dc2908e73f
Reviewed-on: https://gerrit.libreoffice.org/12965
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>