Fixed StringCollector to pass associativity constraint

Collector should pass associativity constraint (i.e. splitting the computation must produce an equivalent result). Existing implementation of StringCollector is failing to pass this constraint. It results in incorrect StringCollector behaviour when used with parallel streams.

Added unit tests to check StringCollector behaviour and prove that existing implementation is incorrect.