writerfilter: turn RTFInternalState into a C++11 scoped enumeration

Change-Id: I7407aeba6ddcfd783cee508faa6731c59d0b9759