Add comparison operators for other primitive types

Note: this breaks null proxy checks of the form
`x->getY() == 0`. Use `!x->getY()` instead.