Don't wrap values with ReactTextComponent in traverseAllChildren (cloneWithProps)

Fix for #1962

Moves wrapping with `ReactTextComponent` to `flattenChildren` instead, where it belongs.

Also very minor code fix-up. Also worth mentioning that the flattening done by `cloneWIthProps` messes with the reactids, so while the idea is to avoid unnecessary allocations I assume, it does affect outcome (i.e, you can't conditionally use `cloneWithProps` without all components remounting).
This is kind of difficult to follow and under-parenthesized. Can we break this apart a bit so that it's easier to read? 

Looks logically correct but it would be interesting to see if the order matters for performance here. I.e. if the type string/number/object check matters on real code.