[BZ-1138420] fix very inefficient algorithm to read a byte array from an InputStream

(cherry picked from commit ef77b58dc743140ee4240892e7c161cb3d72d759)

Conflicts:
	drools-core/src/main/java/org/drools/core/util/IoUtils.java