Refactor RelayRenderer
Refactor RelayRenderer

Summary:This simplifies state handling in `RelayRenderer`, but does not change external behaviour and API. It follows principles described in section "[Thinking in React: Identify the minimal (but complete) representation of UI state](https://facebook.github.io/react/docs/thinking-in-react.html#step-3-identify-the-minimal-but-complete-representation-of-ui-state)". I identified that only two things actually determine internal state of `RelayRenderer`:
- the most recent ready state (the `readyState` state param),
- and whether we received a ready state at least once (the new `active` state param).

The `active` param means that we made a render while having a ready state at least once, and next time we will rerender only if we also have a ready state (we might have reseted the ready state to `null` after sending new queries).

Previously other state params were either redundant or derivable from `readyState` and `active`.

After this refactoring it will probably be easy for `RelayRenderer` to make use of `Relay
Closes https://github.com/facebook/relay/pull/942

Reviewed By: josephsavona

Differential Revision: D3050518

Pulled By: yungsters

fb-gh-sync-id: 8eb8fccaa1eadf16e45c2ef328a37587228424c0
shipit-source-id: 8eb8fccaa1eadf16e45c2ef328a37587228424c0

xuorig/relay,wincent/relay,cesarandreu/relay,gabelevi/relay,dbslone/relay,apalm/relay,mroch/relay,yungsters/relay,iamchenxin/relay,voideanvalue/relay,kassens/relay,gabelevi/relay,chirag04/relay,chentsulin/relay,apalm/relay,cesarandreu/relay,benjaminogles/relay,chentsulin/relay,kassens/relay,zpao/relay,cpojer/relay,NevilleS/relay,mroch/relay,voideanvalue/relay,NevilleS/relay,cesarandreu/relay,voideanvalue/relay,benjaminogles/relay,kassens/relay,facebook/relay,chirag04/relay,mroch/relay,chentsulin/relay,xuorig/relay,kassens/relay,xuorig/relay,rosskevin/relay,rosskevin/relay,facebook/relay,zpao/relay,freiksenet/relay,voideanvalue/relay,freiksenet/relay,wincent/relay,cpojer/relay,yungsters/relay,facebook/relay,iamchenxin/relay,atxwebs/relay,voideanvalue/relay,benjaminogles/relay,gabelevi/relay,dbslone/relay,freiksenet/relay,iamchenxin/relay,josephsavona/relay,xuorig/relay,kassens/relay,xuorig/relay,yungsters/relay,iamchenxin/relay,xuorig/relay,cpojer/relay,cpojer/relay,josephsavona/relay,voideanvalue/relay,wincent/relay,zpao/relay,atxwebs/relay,josephsavona/relay,wincent/relay,atxwebs/relay,wincent/relay,facebook/relay,atxwebs/relay,facebook/relay,apalm/relay,facebook/relay,wincent/relay,chirag04/relay,kassens/relay,NevilleS/relay