Transform to class

Transforms Gregex module to a class, thus having a new api:

`instance = Gregex.new`
`instance.regex(/regex/)`

Also, this PR contains some general refactoring.