Allow appending elements and setting class name in one call

This allows compressing a very common action

```js
selection.append("div").attr("class", "moo");
```

into a single command

```js
selection.append("div.moo");
```

Happy to discuss options to improve the implementation details, but it should work as expected. Added a test and made sure that the existing tests are all passing.