CppEditor: put Q_DECLARE_METATYPE right after the declaration

And before the first use outside the class. This will make sure the
template specialization is generated in the right place. If not, a
static assert is triggered when C++11 is enabled.

Change-Id: I8de7fa52a9986a1f99f3ad32696121ef565ee3b6
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>