Built-in types over “types” module; use isinstance() for checking them

* Built-in types removed from the module in Python 3
* Built-in factories became classes in Python 2.2
* Use abstract classes from “numbers” and “collections” modules where they
  seem appropriate, introduced in Python 2.6