Refactor resolve* methods of *Scope to get passed ASTNode

The resolve methods of Scope and ClassScope now also get the ASTNode
with the occurrence of the given identifier. Consequently the
UnknownIdentifierException and UnknownTypeException are also always
given the ASTNode.