In the constructor, if the data is already a Uint8Array, make a copy.

Change-Id: I2107e7abe1adbb5ed92826dd27fa8d6ec50006bd