Add ErrorReporting class

This is a quite simple class used to set or get current error_reporting() values in a human-readable way (no bitmask stuff etc.).

I will probably also create a Bitmask class and outsource the bitmask functionality from this class into it at a later time.
Add Bitmask class

The Bitmask class makes it easy to modify bitmasks (add or remove values) and to check if a bitmask includes a specific value.
Use the Bitmask class in ErrorReporting
fixed some bugs
fixed a bug in the db.php class