remove more unnecessary C-API usages

- list comprehensions are actually faster than repeated calls to PyList_Append()
- Py_XDECREF() works nicely on PyObject* (and the C compiler will usually drop the NULL check)
- isinstance(x, builtin) translates directly to a PyBuiltin_Check() call