Raise OverflowError for invalid integers (match CFFI).
Introduce py_bool() helper.
Implement Environment.flags().