Adds a shortcut for a shallow flatten for arrays containing only other arrays.
Fixes #1148 -- optimize chaining internally
Merge pull request #1143 from spadgos/flatten-shortcircuit

A shortcut for a shallow flatten
Revert "Fixes #1148 -- optimize chaining internally"

This reverts commit 19a9a73dd1d8e662d237795d2e0975220ba6fa69.
Add a two-part tests for chaining, plus lint.