Fix class merging

[closes #1360]

This also fixes the fact that:

```jade
div(foo="bar" foo="baz")
```

currently compiles to:

```html
<div foo="baz"></div>
```

rather than throwing an error.