Simplify flatten implementation and add startIndex to syntax
Use flatten and omit and pick
Flatten supports null; Loop instead of push.apply
Merge pull request #1685 from megawac/flatten

Rework internal flatten function