Add ErrorCode.Class()

Hi,

Here's a simple feature I could've used today.  Example usage:

```
if pge.Code.Class().Name() == "constraint_violation" {
    // do something
}
```

Any thoughts?