[glassfishv4] + fix issue #1643
https://java.net/jira/browse/GRIZZLY-1643
"The ArrayByteCloner doesn't properly clone a TemporaryHeapBuffer"

+ unit test added
[glassfishv4] + minor cleanup