Use BigInteger for comparator

Fixes https://github.com/eisental/BasicCircuits/issues/23