core: Improve performance of GUID constructor

The GUID constructor that takes an array of bytes as parameter creates
an intermediate string representation that is then immediately
discarded. This patch changes the constructor to build the GUID without
the intermediate string, borrowing the algorithm from a private
constructor of the UUID class. In my environment this reduces the time
to run the constructor from approx 1500ns to approx 75ns. It should also
have a positive effect in garbage collection, as it doesn't generate the
intermediate string. The overall effect in performance is probably not
that big, but every bit helps.

Change-Id: Ia76c3d9e7ee7594d6d925551320635a20399f11f
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
core: Improve performance of GuidUtils.toByteArray

There is no need to use an intermediate stream to convert from an UUID
to an array of bytes, directly generating the array is much faster.

Change-Id: I3f7cf2f899cd9f0be56a79b06f25ad8381bdbfc1
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>