[DROOLS-20] allow equality comparison between an Object and a primitive
(cherry picked from commit f8ae30826cc390812ab299c83ab624905b15775e)