feat(NodeAttrs): Implement forEach to iterate over attributes

In the process, I have moved `test/core_dom/directive_spec.dart` to where it belongs `test/core/core_directive_spec.dart`