Fix an issue in StoreChannel.writeAll() where bytes written was not checked.
Be more strict about encoding when counting bytes the StoreFileChannelTest
Merge pull request #2478 from jakewins/2.1-writeall

Fix an issue in StoreChannel.writeAll()