CppEditor: Fix type hierarchy for forward declarations

The wrong LookupContext/Document was used to lookup the type.

Task-number: QTCREATORBUG-10353
Change-Id: Iac501ca368543716b5f38b6d2bec474ab585e189
Reviewed-by: David Schulz <david.schulz@digia.com>
Designer: Clean up tests

* Make test data driven
* Compare with reference files

Change-Id: I0fed8fcd689da17229853afc940e575b6f22babe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>