Accurate count of types and entities, unit test

Fixes #1, #2, #3.

* Implements an accurate count of types such as defined by the EXPRESS
language and the documentation of the IFC2x3 TC1 and IFC4 schemes
* Adds two unit tests to the __main__ part of the library to check that
the numbers of types and entities are correct.
* Closes the file object after reading it.