Fixes local copy optimization

The previous optimization #32 has problem that restoration requires
assignment operator.
Change the backup/restore process using a template wrapper class to
select code path.
Makes FileReadStream not using local copy optimization
Merge pull request #39 from miloyip/LocalCopyOptimization

Fixes local copy optimization