Add partial support for the hasDeclaration() matcher in the dynamic layer.

Summary:
Add partial support for the hasDeclaration() matcher in the dynamic layer.
This matcher has some special logic to allow any type that has a getDecl() method.  We do not support this right now.

Reviewers: klimek

CC: cfe-commits, revane

Differential Revision: http://llvm-reviews.chandlerc.com/D1889

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195013 91177308-0d34-0410-b5e6-96231b3b80d8