Added test for Flatten performance

Added a simple test to ensure that Flatten is allocating exactly as much memory as it needs.  This gives us some assurance that it's not running append() when cap(slice) == len(slice).