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 

inst.props === undefined || !propsMutated,
        '%s(...): When calling super() in `%s`, make sure to pass ' +
        'up the same props that your component\'s constructor was passed.',
        componentName, componentName
      );
    }
    
    
    inst.props = publicProps;
    inst.context = publicContext;
    inst.refs = emptyObject;
    inst.updater = updateQueue;
    this._instance = inst;
    
    ReactInstanceMap.set(inst, this);
    if (__DEV__) {
      
      
      
      warning(
        !inst.getInitialState ||
        inst.getInitialState.isReactClassApproved,
        'getInitialState was defined on %s, a plain JavaScript class. ' +
        'This is only supported for classes created using React.createClass. ' +
        'Did you mean to define a state property instead?',
        this.getName() || 'a component'
      );
      warning(
        !inst.getDefaultProps ||
        inst.getDefaultProps.isReactClassApproved,