Coalesce warnings for deprecated lifecycle hooks and print single message after reconciliation (rather than one per component-type).

Relates to PR #12028 and [this comment](https://github.com/facebook/react/pull/12028#discussion_r162420575).
startPhaseTimer(workInProgress, 'componentWillReceiveProps');
      instance.componentWillReceiveProps(newProps, newContext);
      stopPhaseTimer();
    } else {
      startPhaseTimer(workInProgress, 'componentWillReceiveProps');
      instance.UNSAFE_componentWillReceiveProps(newProps, newContext);
      stopPhaseTimer();
    }
    if (instance.state !== oldState) {
      if (__DEV__) {
        const componentName = getComponentName(workInProgress) || 'Component';
        if (!didWarnAboutStateAssignmentForComponent[componentName]) {
          warning(
            false,
            '%s.componentWillReceiveProps(): Assigning directly to ' +
              "this.state is deprecated (except inside a component's " +
              'constructor). Use setState instead.',
            componentName,
          );
          didWarnAboutStateAssignmentForComponent[componentName] = true;
        }
      }
      updater.enqueueReplaceState(instance, instance.state, null);
    }
  }
  function callGetDerivedStateFromProps(
    workInProgress: Fiber,
    instance: any,
    props: any,
  ) {