Revamp xalloc interface so that it can check for address arithmetic overflow.