[mypyc] Faster bool and integer conversions (#14422)
Speed up various conversions between bool and integer types. These cases
are covered:
* `bool(x)` for various types
* `int(x)` for `bool` and integer arguments
* Implicit coercion from `bool` to an integer type
Support both regular `int` values and native int values.
(Various small optimizations, including these, together netted a 6%
performance improvement in self check.)