Port of: https://github.com/openjdk/panama-foreign/pull/804 which reduces duplication in the test code by switching test value generation over to a common method in `NativeTestHelper`.
------------- Commit messages: - remove byteWidthOfPrimitive for now - 8302990: Reduce duplication in test code Changes: https://git.openjdk.org/jdk/pull/12856/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12856&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8303582 Stats: 503 lines in 13 files changed: 138 ins; 272 del; 93 mod Patch: https://git.openjdk.org/jdk/pull/12856.diff Fetch: git fetch https://git.openjdk.org/jdk pull/12856/head:pull/12856 PR: https://git.openjdk.org/jdk/pull/12856