Allow passing class names as functions to `classed()`

This patch allows to set class names based on bound data:

    d3.select('body')
      .selectAll('div')
      .data( [{ status: 'foo' }, { status: 'bar' }] )
      .enter()
        .append('div')
        .classed(function(d,i) { return d.status })

    // Returns:
    //
    // <body><div class="foo"></div><div class="bar"></div>

This is useful in situations where you want to add class names to elements based
on properties such as `status`, `country_id`, etc in your data.