Append/insert elements while setting class name and id in one call

This allows condensing the very common action
```js
selection.append("div").attr("class", "foo");
```
into a single command
```js
selection.append("div.foo");
```
This also works:
```js
selection.append("div.first-class.second-class");
// same as
selection.append("div").attr("class", "first-class second-class");
```
as well as

```js
selection.append("div#someId");
// same as
selection.append("div").attr("id", "someId");
```
or even a combination of both
```js
selection.append("div#someId.some-class");
// same as
selection.append("div").attr({ "id": "someId", "class": "some-class" });
```

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. 

**Edit:** I changed the original proposal to the second-parameter implementation, which seems cleaner and much simpler to implement.

**Edit (2):** Changed API back to original proposal which avoids second-argument confusion when used in ``insert``.