Speedify ArrayStream construction for large arrays.
Fix a bug where fork may hang after deregistering a stream.
Speedify the sync GeneratorStream case too.
Minor cleanup.