core: Don't use commons collections clone method

The commons collections package provides a mechanism to clone an object
doing serialization and then deserialization. Unfortunatelly the
implementation uses its own class loader (the class loader that loaded
commons collections itself) to load the class of the serialized object.
This means that the deserialization will fail if commons collections
happens to use be loaded by a class loader that doesn't have access to
the class being cloned. This is what happens if we try to use a JBoss
module instead of dropping commons-collections in the lib directory of
the ear.

This patch implements the clone method so that it uses the context class
loader if possible, this solves the issue with separate class loaders.

Change-Id: Ie563237017e19c9c1462f549c9211fd3c3779999
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
(cherry picked from commit c85128b91ddd69084f0d2cf64b8b069a646492ec)