Make LogicUtil#removeDuplicates more efficient

Prevents expansion costs of the unique element ArrayList by making its initial size the size of the input Collection.
Signed-off-by: Ollie <o.dzineit@gmail.com>