CppEditor: Fix InsertDefFromDecl::match

Now InsertDefFromDecl finds the right implementation file and the speed
of match() is improved.

Task-number: QTCREATORBUG-9627

Change-Id: Ibff824f52124e8cc10ccb6a97c133e11565473db
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>