Make stream local copy optimization as trait option per stream type

By Adding StreamTraits<Stream>, stream types can specify whether to turn on local copy optimization.
Added unit test to verify that a Stream without copy constructor do not use this optimization by default. Turning it on will generate compilation error.

Fixes #30