Add bytesWritten proxy to CryptoStream

This adds a bytesWritten proxy to CryptoStream.

See #4650 for discussion.