Fix asReadOnlyBuffer to conserve the byte order (on everything except ByteBuffer).

And add tests to exercise another wart of non-uniformity on this heinous API.

Bug: http://code.google.com/p/android/issues/detail?id=15994
Bug: 4361578

git cherry-pick 54298028777ffe4d5ec02e7908b333400d4f23a6

Change-Id: Id95256efe98edc0b350351e416e67c8f01ac64b7
8 files changed