CppEditor tests: work on documents instead of editors

Change-Id: I27964a585996f9838a87856fd68067ce29ce755a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>