Implement equal, hash and copy for int.