If you attach a `ref` to an element using a string (`ref='foo'`) and use `ReactTestRenderer` you get the `"Stateless function components cannot be given refs"` warning

See https://github.com/facebook/react/issues/7371#issuecomment-237816352

This is because `getPublicInstance` returns `null` and `attachRef` requires that the instance be non-null in the warning invariant.

I think we can either return a simple instance instead of `null` or use some additional check in `attachRef` to see if we're dealing with `ReactTestRenderer`. The first option seems reasonable, given the comment in the current code: 

``` js
ReactTestComponent.prototype.getPublicInstance = function() {
  // I can't say this makes a ton of sense but it seems better than throwing.
  // Maybe we'll revise later if someone has a good use case.
  return null;
};
```

cc @spicyj 

log.push('render ' + this.props.name);
        return <div />;
      }
      componentDidMount() {
        log.push('mount ' + this.props.name);
      }
      componentWillUnmount() {
        log.push('unmount ' + this.props.name);
      }
    }
    var renderer = ReactTestRenderer.create(<Log key="foo" name="Foo" />);
    renderer.update(<Log key="bar" name="Bar" />);
    renderer.unmount();
    expect(log).toEqual([
      'render Foo',
      'mount Foo',
      'unmount Foo',
      'render Bar',
      'mount Bar',
      'unmount Bar',
    ]);
  });
  it('gives a ref to native components', function() {
    var log = [];
    ReactTestRenderer.create(<div ref={(r) => log.push(r)} />);
    expect(log).toEqual([null]);
  });
  it('supports error boundaries', function() {
    var log = [];
    class Angry extends React.Component {