AST: Expand ListNode coverage.
AST: Introduce generic equality. Drop __hash__ from nameless types.
AST: Restrict inheritance of NameNode. Fix build.