DERBY-6184: Clean up warnings in XA transaction id classes

- simplify existing cloning of arrays by using clone() instead of
  calling new and arraycopy

- reduce visibility of array-returning methods in GlobalXactId to make
  it clearer for code analysis tools that they are not called from
  outside of the package in which the class lives

- remove said methods from the GlobalTransactionId to allow them to be
  non-public

- make the public, array-returning methods in XAXactId return copies
  of the internal arrays to protect the internal state, as instances
  of this class may be returned all the way out to the user

git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/trunk@1469243 13f79535-47bb-0310-9956-ffa450edef68